OnlineWebTools

How to display directory content in reverse in Linux

The ls command by default displays the directory content in alphabetical order. To display it in reverse order, simply add the -r option to the command, as in the following example;

$ ls
Archive  Desktop  Documents  Misc  Music  Pictures  temp  Videos
$ ls -r
Videos  temp  Pictures  Music  Misc  Documents  Desktop  Archive
Exit mobile version