Detail usage of ls -l command
Introduction
In Linux, the ‘ls’ command is used to list the contents of a directory. The ‘-l’ option is used with the ‘ls’ command to display the contents of a directory in a detailed format. This blog post will discuss the details of the ‘ls -l’ command in Linux.
Input
ls -l
Output
-rwxr-xr-x 1 root root 12028816 May 13 22:58 b
- First field (1 character): File type
- Second field (9 characters): Permissions
- Third field (1 character): Number of hard links
- Fourth field: Owner
- Fifth field: Group
- Sixth field: File size (in bytes)
- Seventh field: Last modified time
- : Regular file
d: Directory file
b: Block device file
c: Character device file
l: Symbolic link
p: Pipe file
s: Socket file