16.3 Looking Around With ls 231
Figure 16.8: Adding an alias for the ls command to the .bashrc file
Simply pressing Enter will save your changes to your .bashrc file.
You won’t be able to see your changes take effect until you close your xterm window and open a new
xterm. Once you do that, you’ll see your modifications take effect.
Here’s a short list of some popular options with ls. Remember, you can view the full list by reading
the ls man page (man ls).
-a – all. Lists all the files in the directory, including the hidden files (.filename). The .. and .
at the top of your list refer to the parent directory and the current directory, respectively.
-l – long. Lists details about contents, including permissions (modes), owner, group, size,
creation date, whether the file is linked to somewhere else on the system and where its link
points.
-F –file type. Adds a symbol to the end of each listing. These symbols include / to indicate a
directory; @ to indicate a symbolic link to another file; * to indicate an executable file.
-r – reverse. Lists the contents of the directory from back to front.
-R – recursive. This recursive option lists the contents of all directories (below the current
directory) recursively.
-S – size. Sorts files by their size.
Comments to this Manuals