[H-GEN] chestnut

Christopher Biggs chris at epipe.com.au
Wed Mar 26 20:28:43 EST 2003


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

Greg Black <gjb at gbch.net> moved upon the face of the 'Net and spake thusly:

>
> The correct answer is, of course:
>
>     rm `ls -t | tail -1`
>
> Note that those are backquotes, not single quotes.

Oops...  I guess my fingers know the difference between being in emacs
and at a bash prompt.  :-)

Anyway, the *real* "correct" answer to the original question is:

        "why? what do you actually need to achieve?"

Narrowing the problem domain will help to avoid needlessly baroque
solutions that cope with all sorts of warts (subdirectories, empty
directories, other non-file directory entries, ctime vs utime vs
mtime, etc.)



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