[H-GEN] chestnut

Russell Stuart russell at stuart.wattle.id.au
Wed Mar 26 19:33:10 EST 2003


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

On Thu, 2003-03-27 at 09:40, Sarah Hollings wrote:
> Anyone know of a simple one-[or-two]-liner (in bash or perl -e) for 
> deleting the oldest file in a directory?

rm `/bin/ls -rt directory | sed 1q`

--
* 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