Question: Project 2 - 8 The ls command is one of the most useful commands. In this project, you will start by using ls to view
Project
The ls command is one of the most useful commands. In this project, you will start by using ls to view your working directory. Next, you use ls with an argument to view a file and then a directory. For a more complete listing of information about the contents of a directory, you use the l option, and finally you use the a option to include hidden files in a directory listing.
To see a list of files and directories in your current working directory: Type ls and press Enter. You see a list of file and directory names.
To see a listing for a specific file or directory:
If you are not in your home directory, type cd and press Enter.
InChapterTheEssenceofUNIXandLinuxyouusedthecatcommandtocre ate a notes file. You should still have that file in your home directory. If not, use cat again to create a notes file. Type ls notes and press Enter. The system displays the listing for the notes file.
To see the contents of a directory other than your current working directory, give the directory name as an option to the ls command. For example, to see the contents of the var directory, type ls var and press Enter. You see a listing similar to the one in Figure
To use the ls command with the l option:
Type ls l dev and press Enter. You see information similar to that in Figure This shows a listing of block special and character special files in the dev directory. Notice in the first column of information that the block special files begin with a bYou may need to scroll up to find a block special file. What designates a char acter special file?
Type ls l and press Enter to view the contents of the root file system directory. Refer to Figure earlier in this chapter.
To list hidden files in your home directory:
Type clear and press Enter to clear the screen.
Type ls a after the command prompt and press Enter. See Figure
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
