I’m using “find . -name ‘*-FLAIR’ -type d -ls -exec cp -lr -t …/…/…/media_links/ {} ; | grep ‘Aug 18’” to make hardlinks for directories created on a certain date. However, I always get an error saying that it can’t create hardlinks for a folder that doesn’t even match the find criteria, while it works for the folders that I wanted. So, everything works, but I just wanna know why I’m getting that error. Any help? lmk if u need more info
I’m using “find . -name ‘*-FLAIR’ -type d -ls -exec cp -lr -t …/…/…/media_links/ {} ; | grep ‘Aug 18’” to make hardlinks for directories created on a certain date. However, I always get an error saying that it can’t create hardlinks for a folder that doesn’t even match the find criteria, while it works for the folders that I wanted. So, everything works, but I just wanna know why I’m getting that error. Any help? lmk if u need more info
Try swapping the positions of
-name ‘*-FLAIR’
and-type d
Perhaps you need to use -ctime parameter on find command.
That might be a lifesaver! I’ll try it today. I also see there’s a -cmin parameter which lets me be even more specific. Thanks