Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-17-2008, 05:51 AM   #1
LQ Newbie
Registered: Dec 2008
Posts: 7

Rep: Reputation: 0
Copy by date

Hi folks,

Simple question possibly, but how do I move/copy files by date or time?

E.g. copy files created on a certain date to another folder.

Old 12-17-2008, 06:10 AM   #2
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
I'd probably start by using find and if you need to move in different dirs depending on date, use find in a script.

Something like:

$find . -type f -ctime <time_you_want> -exec cp -v {} <your_path> \;

You might want to look at the find man page for things such as:

I hope this is what you are looking for.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
copy folder/files according to modification date bkcreddy17 Programming 14 10-15-2008 08:24 PM
copy based on date Byenary Linux - General 2 03-02-2007 05:13 PM
CLI copy files by date linuxhippy Slackware 2 06-23-2006 10:01 PM
Copy files after a certain date davholla Linux - General 2 03-17-2005 10:29 AM
Date-based copy AdmiralThrawn Linux - General 2 02-23-2004 10:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:15 PM.

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