To list the contents of your home directory, either type the full path to your home directory, or use
the ls command without a directory name. Using the -a option to ls enables you to view the
hidden files (known as dot files because they start with that character) as well as all other files.
With the -l option, you can see a long, detailed list of information on each file. (You can put multiple
single-letter options together after a single dash??”for example, -la.)
$ ls -la /home/chris
total 158
drwxrwxrwx 2 chris sales 4096 May 12 13:55 .
drwxr-xr-x 3 root root 4096 May 10 01:49 ..
-rw------- 1 chris sales 2204 May 18 21:30 .bash_history
-rw-r--r-- 1 chris sales 24 May 10 01:50 .bash_logout
-rw-r--r-- 1 chris sales 230 May 10 01:50 .bash_profile
-rw-r--r-- 1 chris sales 124 May 10 01:50 .bashrc
drw-r--r-- 1 chris sales 4096 May 10 01:50 .kde
-rw-rw-r-- 1 chris sales 149872 May 11 22:49 letter
^ ^ ^ ^ ^ ^ ^
col 1 col 2 col 3 col 4 col 5 col 6 col 7
Displaying a long list (-l option) of the contents of your home directory shows you more about
file sizes and directories. The total line shows the total amount of disk space used by the files in
NOTE
42
Linux First Steps Part I
the list (158 kilobytes in this example). Directories such as the current directory (.
Pages:
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176