Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I want to delete files of specific date, how can I do it?
for example I have file list as
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:41 1_19390.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:42 1_19391.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:42 1_19392.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:43 1_19393.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:43 1_19394.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:43 1_19395.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:44 1_19396.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:44 1_19397.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:45 1_19398.dbf
-rw-r----- 1 oracle oinstall 10484224 Oct 22 14:46 1_19399.dbf
I want to delete files of dated Oct 22 2004.
It will be more helpfull if some body also tell me how to move and copy of specific date files.
The ctime option most closely describes your request
The man page for find says like this about the ctime option.
Quote:
-ctime n
File's status was last changed n*24 hours ago.
This means last time the metadata (information about the data file) was changed. That could be creation of the file, file moved, file name changed, attributes changed on file...
(Correct me if that wasn't a correct explanation.)
Ok, i got here by searching, so i didn't have to open a new thread to ask my very similar question.
I need to move files in a mounted remote directory, to a local directory, right? I need to move the files that are from yesterday alone. So, if a file was created yesterday, that file needs to be moved. So basically i need to find the files that have a date 'yesterday' and move them over. Just out of being a Sammy Sosa, i guess i could do something like: find /sourcedirectory -mtime 1 | mv /destination/directory
I hope i didn't make a big mess out of my explanation.
Ok, i got here by searching, so i didn't have to open a new thread to ask my very similar question.
I need to move files in a mounted remote directory, to a local directory, right? I need to move the files that are from yesterday alone. So, if a file was created yesterday, that file needs to be moved. So basically i need to find the files that have a date 'yesterday' and move them over. Just out of being a Sammy Sosa, i guess i could do something like: find /sourcedirectory -mtime 1 | mv /destination/directory
I hope i didn't make a big mess out of my explanation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.