On Thu, 2006-03-23 at 12:05, Chris Norman wrote: > I need to check files to see how old they are. > > How can I do this from within a backup script? > > I need to see if they are over a month old, and if so delete them. How do I > get they're last modified stamp please? cd /path/to/start || exit find . -type f -ctime +31 would give you a list of files more than 31 days old. find . -type f -ctime +31 -print0 |xargs -0 rm -f would delete them - but be sure you know what you are doing before you execute that... And be sure you quit if you can't cd to the right place instead of deleting in the wrong location. -- Les Mikesell lesmikesell@xxxxxxxxx -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list