Linux ls Command Explained with Options and Examples for Beginners
One of the most frequently used Linux command is ls command. It just means list and it displays the files and the directories within your current folder. It may seem straightforward, but with the available options, ls can show hidden files, sort results, provide information about files, and so on. Let us now proceed step by step through the most useful options, with real examples. Basic ls Command By default, it is displaying the files and folders in your current directory. Option: -l What it does : Displays files in long list format. Why it comes in handy : You can view file permissions, owner, size and last modified date. Explanation : -rw-r--r-- → permissions user user → owner and group 1200 → file size in bytes Sep 5 → last modified date report.txt → file name This is used when you require additional information regarding files. Option: -a What it does : Displays all files, even those that are hidden (files that begin with a dot). Why it is useful : Linux contains a large numb...