Home / VPS & Dedicated / Using the "ls" Command in Linux

Using the "ls" Command in Linux

ls command in Linux
In Linux, few commands are more important when managing your file system than “ls”. On a server, it is very important to know how to view files and their properties. With “ls” you can view a simple list of files or any number of more complicated variations of the list.

Typing “ls” with no flags will give you multiple columns of files and directories in alphabetical order. Adding an “-a” flag will display hidden files (those with a “.” in front of the names). Add an “-l” flag, and you will see long format, with directory information, permissions, file size, and modification date.

Some servers are set to show colors by default. If yours is not, add the “–color” flag to show your directories and various files in different colors, which makes it easier to distinguish a directory from a file and an executable from a text file. Add an “-r” to display the results in reverse order. “-U” will not sort them at all and leave them in directory order. There are many other combinations and flags you can use with “ls”. For a complete guide, type “man ls” from the command line.

Check Also


Importance of web hosting to business

The world of business is very ruthless and unfair in some cases. It is a …