The -l option in the ls command provides a long format listing of files and directories.
Key Features of -l:
- Detailed Information: Displays several attributes for each file and directory, including:
- File Type and Permissions: Indicates the type (file, directory, etc.) and the permissions for the owner, group, and others.
- Number of Links: Shows how many hard links point to the file or directory.
- Owner: Displays the username of the file's owner.
- Group: Shows the group name associated with the file.
- File Size: Indicates the size of the file in bytes.
- Modification Date and Time: Shows when the file was last modified.
- File/Directory Name: Lists the name of the file or directory.
Example:
When you run ls -l, the output might look like this:
-rw-r--r-- 1 user group 1234 Jan 01 12:00 file.txt
drwxr-xr-x 2 user group 4096 Jan 01 12:00 directory
This format helps users understand the properties of each file and directory at a glance. If you have more questions, feel free to ask!
