You are viewing a single thread.
View all comments View context
4 points

Your grep is getting the output of find piped into it, so there’s nothing in the find command itself (which has the -exec in there) to filter it down so it applies to everything find finds. You’re filtering for ‘Aug 18’ after find has already -exec the cp -ltr command.

You probably want this:

find . -name '*-FLAIR' -name '*Aug 18*' -type d -ls -exec cp -lr -t ../../../media_links/ {} \;
permalink
report
parent
reply
1 point

Oh the files don’t have the date in their names. Is -name still gonna work with ‘Aug 18’? I’m parsing for the date shown by -ls.

permalink
report
parent
reply

Linux

!linux@programming.dev

Create post

A community for everything relating to the linux operating system

Also check out !linux_memes@programming.dev

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

Community stats

  • 2.4K

    Monthly active users

  • 396

    Posts

  • 2.9K

    Comments