I want to create an alias that displays the latest log in a certain directory - something like:
ls -lat *log* | tail -1 | less
The above command does not work as the output of the ls -lat
command does not produce a single final name but a full list of columns.
Any simple solution?
Get rid of the
-l
and use-1
instead. Really, it's all in the book.