procmail
[Top] [All Lists]

Re: backup problem

1997-07-04 00:56:00
On Fri, 4 Jul 1997 00:14:03 -0400 (EDT),
"Russell W. Behne" <russ(_at_)otp(_dot_)illuminet(_dot_)net> wrote:
   :0 ic
   | cd z.backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`
<...>
The path to the file is /home/russ/mail/z.backup, (z.backup is a file, not a
directory.) All my incoming mail is sorted into folders in /home/russ/mail/

This will only work if z.backup is a directory. The script snippet
works by cd:ing to that directory, taking a listing by date, snipping
off the first 100 from that listing, and passing whatever remains to
rm. In other words, it will keep the 100 newest files in the directory
and delete the rest. 

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>
  • backup problem, Russell W. Behne
    • Re: backup problem, era eriksson <=