Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-17-2005, 09:16 AM   #1
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 720

Rep: Reputation: 32
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.
Old 03-17-2005, 09:24 AM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Something like this example where jpg files that are less than 30 days old are copied to the new folder.
find /home/images -type f -name '*.jpg' -mtime -30 -exec cp {} /home/new \;
Old 03-17-2005, 09:29 AM   #3
Senior Member
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete/move/copy files of specific date imsajjadali Red Hat 26 11-07-2013 11:34 PM
filter files by date novaprime Linux - Software 1 05-31-2005 05:51 AM
Auto Change Date on copy to user folder mariusak Linux - General 4 05-28-2005 06:42 PM
Date-based copy AdmiralThrawn Linux - General 2 02-23-2004 09:03 AM
Removing all files with the same date. Bookmarc Linux - General 1 08-12-2002 03:35 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration