The ls Command
Why we use ls command
The ls command is used to list files or directories in Linux and other Unix-based operating systems.
Just like you navigate in your File Explorer or Finder with a GUI, the ls command allows you to list all files or directories in the current directory by default, and further interact with them via the command line.
ls command use for lists directory content
man ls displays manual pages
Understanding ls command output
ls -ll
The command's output displays the permissions, ownership, size, created or last accessed date/time, and the filename:
Total: show total size of the folder.
File type: First field in the output is file type. If the there is a – it means it is a plain file. If there is d it means it is a directory, c represents a character device , b represents a block device.
Owner: This field provide info about the creator of the file.
Group: This filed provide info about who all can access the file.
File size: This field provide info about the file size. By default the ls -l command give output in bytes.
Now permission can be divided into three parts: Owner, Group, Other
r: read permission
w: write permission
x: execute permission
By Miss Neha G. Kurale
ODF Support Engineer - At IBM
3 年Thanks for the sharing. It was really helpful. Looking forward to see more such posts from you.