Sort a hierarchy of files to display the most recent last

Using a Unix operating system, many commandline tools come often to ease my life. I immediately think about strace, netstat or lsof, but I also use a lot ls -rtl to display the files from the current directory sorted according their modification date: it's often useful to distinguish interesting files from a directory full of other files, find newly created log files, recently modified config files, etc. But what about performing that sort recursively? I have found no tool to do so, so I've written one in Perl.

It emulates by default ls -F (appending a star, a slash, an equal sign or a pipe depending on the type of the file) and ls --color (using colors described in LS_COLORS from the environment to display the file names according to their types or extensions), and can display more information like ls -l does with the appropriate switch.

An example of the default behaviour:

Example of the default behaviour

An example of the `longer' behaviour:

Example of the longer behaviour

You might want to download this small Perl script, or have a look at the beautified version. Using it is straitforward. Hope it helps.

Mon Feb 7 16:14:52 2005
Valid XHTML 1.0!