The output of the ls -l command provides detailed information about files and directories. Here’s how to interpret each part of the output:
-
File Type and Permissions: The first column shows the file type and permissions.
- The first character indicates the type:
-for a regular file,dfor a directory,lfor a symbolic link, etc. - The next nine characters represent permissions: three for the owner, three for the group, and three for others (e.g.,
rwxr-xr--).
- The first character indicates the type:
-
Number of Links: The second column shows the number of hard links to the file or directory.
-
Owner: The third column displays the username of the file's owner.
-
Group: The fourth column shows the group name associated with the file.
-
File Size: The fifth column indicates the size of the file in bytes.
-
Modification Date and Time: The sixth column shows the last modification date and time of the file.
-
File Name: The final column displays the name of the file or directory.
Example Output:
-rw-r--r-- 1 user group 2048 Mar 1 12:34 example.txt
-rw-r--r--: Regular file with read/write permissions for the owner, and read permissions for the group and others.1: One hard link.user: Owner of the file.group: Group associated with the file.2048: Size of the file in bytes.Mar 1 12:34: Last modified on March 1 at 12:34 PM.example.txt: Name of the file.
This format helps you understand the properties and permissions of files and directories in a directory listing.
