a creative use of find

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to delete all files in a directory that have creation dates before September 16th. I have been trying to use the find command to do this, but no luck so far. The best I have come up with is to try to copy files newer than a particular file of that date, like this:

find . -newer file.name -exec cp -p ../dir \;

but this doesn't work. I have tried using -mtime, -atime, but no joy. I can't find an option that uses the creation time, and applies it to files that are OLDER than that time.

Any ideas?

TIA,

Bill Tangren

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux