The "ls" Utility (And Hidden Files)
Wow, so now you are zipping all about the file system. However, you still can't do much in any of the directories you move to until you have some means of reading the contents of the directories you have moved to.
To get a directory listing, you will use the "ls" utility which follows the rules described in the table below:
The options for the "ls" command are described in the table below:
Here are some examples of using the "ls" command. Note that you can use multiple options at one time by simply adding them to the option list.
Notice in the example above, the ls command turned up quite a different file list than the ls -a even though they were listing the same directory. This is because the ls -a command lists hidden files as well as normal files.
A Hidden File is a file whose name begins with a period. These files are usually administrative files and are often distracting when you are doing your daily work. Thus UNIX hides them unless you specifically ask to see them with the -a option
Okay, here are some more examples of the ls utility
Now you practice using the "ls" utility in some of the directories you moved to in the last section.
Focus on the "-l" Option
The image below shows a typical "-l" listing. In the image you will see that there are several fields listed for each file.
The following table overviews the information
provided by the -l option...
The ls -l option also includes several options that affect the listing. These options are shown below: