perl -e '@sorted = sort { -M $a <=> -M $b } </path/*>; unlink foreach +@sorted[10..$#sorted]'
In reply to Re: find "x" quantity newest files in a dir
by Aighearach
in thread find "x" quantity newest files in a dir
by braintoast
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |