Perl Cookbook, ch. 09.13: lst – list sorted directory contents (depth first)

Using “-l” for “long listing” this utility (“lst”) lists the respective time stamp with a precision down to seconds. This utility obviously is a Perl script with rather few depencies.

The “ls” of GNU coreutils does this as well with “–time-style” and even nicer (IMO). This utility is a binary one and needs compilation.

“Perl Power Tools” (PPT) also have an “ls”, and that one is quite easily patched to display any wanted format of the time stamp by making use of POSIX::strftime.

In environments, where I can’t / shouldn’t really install binary utilities, getting this “lst” going is a piece of cake.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.