in reply to Re: find "x" quantity newest files in a dir
in thread find "x" quantity newest files in a dir
This assumes there are no filenames with newlines in them.find . -type f | perl -nle 'print -M, "\t$_"' | sort -n | \ + tail +10 | cut -f 2 | xargs rm
-- Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: find "x" quantity newest files in a dir
by thatguy (Parson) on Jun 28, 2001 at 04:44 UTC |