On Thu, 6 Jun 2002, Cameron Simpson wrote: > On 23:15 05 Jun 2002, Jesse Angell <[EMAIL PROTECTED]> wrote: > | Here is my script > | #!/bin/sh > > Note - this isn't bash - it's generic Bourne shell - works in bash, ksh, etc. > Always a worthy goal. It merely happens that /bin/sh is bash on most Linux > systems. > > | cp $root/$instance/psdata/pserver.prefs $root/$instance/psdata/backup/pserver > | `date +%y%m%d`.prefs > | > | This script is ran daily. The one thing that I need to do is set it so after > | those are 5 days old the script deletes them. ( the backups) as it would become > | hectic after a few months. > | How do I have it delete the files that are 5 days old? > > find $root/$instance/psdata/backup/pserver????????.prefs -mtime + 5 -exec rm {} ';'
^^^^^^^^^^ first, that should read "-mtime +5". but what does the poster mean by "5 days old"? access time? modification time? check out "man find" for the possibilities. rday _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list