this post was submitted on 18 Aug 2024
35 points (94.9% liked)
Linux
14798 readers
253 users here now
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Your
grepis getting the output of find piped into it, so there's nothing in the find command itself (which has the-execin there) to filter it down so it applies to everythingfindfinds. You're filtering for 'Aug 18' afterfindhas already-execthecp -ltrcommand.You probably want this:
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.