How Do I Move a File from a Specific Date in Unix?
Contents How Do I Move a Specific Date in Unix? How It Works Find. – Mindepth 1 -Maxdepth 1. … -Mtime -7. This Tells Find to Select Only Files Less Than Seven...
Contents
How do I move a specific date in Unix?
How it works
- find . – mindepth 1 -maxdepth 1. …
- -mtime -7. This tells find to select only files less than seven days old.
- -exec mv -t /destination/path {} + This tells find to execute a mv command to move those files to /destination/path .
How do I copy a file from a specific date in Linux?
-exec would copy every result returned by find to the specified directory ( targetdir in the above example). The above copies all the files in the directory that were created after 18 September 2016 20:05:00 to the FOLDER (three months before today I would first store the list of files temporarily and use a loop.