Reverse dir listing

Tried to make a log of the latest 20 dirs in a folder, and had some trouble with reversing the output, i wanted the newest dir at the top, the answer made me laugh.

Tac is like cat, but reversed.

For those interested: ls -tr /home/user | tail -n 20 | tac > latestdirs.log

No tags.
  • Trackbacks
  • Comments
  • No Comments yet.
  • No trackbacks yet.

Leave a Reply

*