Operation Manual
tux@knox:~> ls
bin Desktop Documents public_html tux.txt
tux@knox:~>
Files in Linux may have a le extension or a sufx, such as .txt, but do not need to
have one. This makes it difcult to differentiate between les and folders in this output
of the ls. By default, the colors in the Bash shell give you a hint: directories are usually
shown in blue, les in black.
21.2.2 Using Commands with Options
A better way to get more details about the contents of a directory is using the ls com-
mand with a string of options. Options modify the way a command works so that you
can get it to carry out specic tasks. Options are separated from the command with a
blank and are usually prexed with a hyphen. The ls -l command shows the contents
of the same directory in full detail (long listing format):
tux@knox:~> ls -l
drwxr-xr-x 1 tux users 48 2006-06-23 16:08 bin
drwx---r-- 1 tux users 53279 2006-06-21 13:16 Desktop
drwx------ 1 tux users 280 2006-06-23 16:08 Documents
drwxr-xr-x 1 tux users 70733 2006-06-21 09:35 public_html
-rw-r--r-- 1 tux users 47896 2006-06-21 09:46 tux.txt
tux@knox:~>
This output shows the following information about each object:
drwxr-xr-x❶ 1❷ tux❸ users❹ 48❺ 2006-06-23 16:08❻ bin❼
❶
Type of object and access permissions. For further information, refer to Sec-
tion 21.5.1, “Permissions for User, Group and Others” (page 311).
❷
Number of hard links to this le.
❸
Owner of the le or directory. For further information, refer to Section 21.5.1,
“Permissions for User, Group and Others” (page 311).
❹
Group assigned to the le or directory. For further information, refer to Sec-
tion 21.5.1, “Permissions for User, Group and Others” (page 311).
❺
File size in bytes.
❻
Date and time of the last change.
❼
Name of the object.
302 Reference










