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:
This let me find some a set of modifications that were made to a rather large tree of files, where the file-names themselves were not unique (actually: insanely redundant and useless. "1.dat 2.dat ..."). Pruning down to last-branch brough things back to the "project-name" scope, and it's then easy to see which branches of the tree have recently changed, or any other similar search.
Ideally, it should sort the directories by the mtime of the most recent *file* *inside* the directory, but that's probably outside the scope of a (sane...) command line.
Sort by time and Reverse to get Ascending order, then display a marker next to the a file, negate directory and select only 1 result
Then pipe to 'xargs ls' for a familiar listing, possibly using find's -print0 and xarg's -0 options.
atime and mtime timestamps of $FILE2 is changed according to the ones of $FILE1. If $FILE2 doesn't exist is created.