[nylug-talk] logrotate question
N.J. Thomas
njt at ayvali.org
Sat Feb 2 17:17:07 EST 2008
* C Thala <cthala at gmail.com> [2008-02-02 16:47:31-0500]:
> I would like to keep the last N files. Let's say 5.
ls foo.*gz|head -n -5|xargs rm -f
(You need GNU head for this to work. Try ghead(1) if you are on a BSD
box. But then, you probably don't care about that since you are reading
this on NYLUG.)
Thomas
--
N.J. Thomas
njt at ayvali.org
Etiamsi occiderit me, in ipso sperabo
More information about the nylug-talk
mailing list