User Tools

Site Tools


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
unix_commands/ls.txt · Last modified: 2023/01/16 04:47 by admin

CIFNet is a leading hosting solution provider, offering a wide range of services including IP bandwidth, co-location, VMware and KVM hosting.
Host Your Site with CIFNet!