LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Copy files after a certain date (https://www.linuxquestions.org/questions/linux-general-1/copy-files-after-a-certain-date-302728/)

davholla 03-17-2005 09:16 AM

Copy files after a certain date
 
How can I use cp to copy files after date x ?
I have looked in the man pages but without success.
I have also looked on this site.

homey 03-17-2005 09:24 AM

Something like this example where jpg files that are less than 30 days old are copied to the new folder.
Code:

find /home/images -type f -name '*.jpg' -mtime -30 -exec cp {} /home/new \;

WhatsHisName 03-17-2005 09:29 AM

davholla: This may not be exactly what you want to do, but it would be easy to do.

You could create a shell to do the copying and call it as a cron job on whatever frequency you want.


All times are GMT -5. The time now is 08:41 PM.