Re: Shell Scripting Question.

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

 



find /path -ctime +2 -ok rm {} \;

This will find all files starting with /path that have been changed
more than 2 days ago and will prompt you for deleting them one by one. 
Get rid of the -ok if you KNOW it will delete only the files you want
deleted.  Change -ctime to -atime to find by access time rather than
modification time.

-Michael

>>> Dan@omnexcontrols.com 11/26/02 01:57PM >>>
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



-- 
Psyche-list mailing list
Psyche-list@redhat.com 
https://listman.redhat.com/mailman/listinfo/psyche-list



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux