When I tried:
 find $root/$instance/psdata/backup/pserver????????.prefs -mtime + 5 -exec
rm {} ';'
It gave me the error:
find: invalid argument `+' to `-mtime'

Whats wrong with it?

--------------
Jesse Angell
PalaceUnlimited.com
#1 Palace Host
----- Original Message -----
From: "Cameron Simpson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 05, 2002 11:56 PM
Subject: Re: Bash scripting


> 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 {} ';'
>
> Someone may mention xargs, but there's no gain here.
> --
> Cameron Simpson, DoD#743        [EMAIL PROTECTED]
http://www.zip.com.au/~cs/
>
> You can't always get what you want. - The Rolling Stones
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>



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

Reply via email to