On Feb 2, 2008 5:17 PM, N.J. Thomas <njt at ayvali.org> wrote: > > I would like to keep the last N files. Let's say 5. > > ls foo.*gz|head -n -5|xargs rm -f Excellent, that did the trick! Thanks!