One of the most basic and used commands in a Linux environment is ls. It stands for list and displays the content of a folder. In this article, we’ll show the most useful usage of the Linux ls command.
Display the content of a folder including hidden files and additional information
ls -la
* Note: l stands for long, it will display additional information about the files and directories
* Note: a stands for all, it will display hidden files as well
Display inodes’ numbers using ls
ls -i
Display files and directories, sorting by size
ls -S
Show output in a human-readable format
ls -lh
You can use any of the above-mentioned options in combination with the other to view the desired outcome.