commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
There are 8 alternatives - vote for the best!
Replace "-nt" with "-ot" for oldest.
shopt -s dotglob
first to include dotfiles.
Works recusivley in the specified dir or '.' if none given.
Repeatedly calls 'find' to find a newer file, when no newer files exist you have the newest.
In this case 'newest' means most recently modified. To find the most recently created change -newer to -cnewer.
If you can do better, submit your command here.
You must be signed in to comment.