Israel Garcia skrev:
Hi List,

It's a simple  question but difficult to me :-).

How can I delete all files on a folder /xxxx but keeping only the two
latest (newest)  files?

untested, run it with 'echo' in front first to test:
rm $(ls -rt | sed '1,2d')


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to