[H-GEN] chestnut

Christopher Biggs listjunkie at pobox.com
Wed Mar 26 19:29:46 EST 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Sarah Hollings <sarah at humanfactors.uq.edu.au> moved upon the face of the 'Net and spake thusly:

>
> Anyone know of a simple one-[or-two]-liner (in bash or perl -e) for
> deleting the oldest file in a directory?

$ rm -f 'ls -t | tail -1'



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list