Dan de Haan wrote:

I have a simple shell script that runs from cron and makes a backup of some
filed to another PC via NFS.  I want to have it automatically delete old
backups form the NFS server.  How would I do that, is there a delete files
older then N days command?

	-Dan

/usr/bin/find . -atime +10 -exec rm -f {} \;

will find all the files under the current directory and subdirectories that have not been accessed in over 10 days, then delete them.
Use with caution! You might want to try this on a test directory first, to make sure it does what you want. Also note that it will also execute on the subdirectories.....







--
Psyche-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/psyche-list

Reply via email to