//**ls**// - lists files and directories
The //ls// command is one of the most frequently used Linux and Unix-like system commands. It lists files and directories within a system. When executing without a flag or parameter, the ls command show the current working directory’s content.
To see content of other directories, use ls followed by the desired path. For example, to see what's in the /var/log folder, enter:
$ ls /var/log
Here are some examples of the **ls** command,
1. The following lists all the files in the subdirectories:
$ ls -R
----
2. The command below shows all files & directories, permission, size, group & user names:
$ ls -la
----
3. This command shows the file sizes in easily readable formats, such as MB, GB, and TB:
$ ls -lh