Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Switch to a command-line terminal (tty5) by pressing Ctrl1Alt1F5 and log in to the terminal using the user name of root and the password

1. Switch to a command-line terminal (tty5) by pressing Ctrl1Alt1F5 and log in to the terminal using the user name of root and the password of LINUXrocks!.

2. At the command prompt, type cd /etc and press Enter. Verify that you are in the /etc directory by typing pwd at the command prompt and press Enter.

3 At the command prompt, type ls and press Enter. What do you see listed in the four columns? Do any of the files have extensions? What is the most common extension you see and what does it indicate? Is the list you are viewing on the screen the entire contents of /etc?

4 At the command prompt, type ls | more and then press Enter (the | symbol is usually near the Enter key on the keyboard and is obtained by pressing the Shift and \ keys in combination). What does the display show? Notice the highlighted --More-- prompt at the bottom of the screen. Press Enter. Press Enter again. Press Enter once more. Notice that each time you press Enter, you advance one line further into the file. Now, press the spacebar. Press the spacebar again. Notice that with each press of the CHAPTER 3 Exploring Linux Filesystems 137 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202 spacebar, you advance one full page into the displayed directory contents. Press the h key to get a help screen. Examine the command options

5 Press the q key to quit the more command and return to an empty command prompt.

6 At the command prompt, type ls | less and then press Enter. What does the display show? Notice the : at the bottom of the screen. Press Enter. Press Enter again. Press Enter once more. Notice that each time you press Enter, you advance one line further into the file. Now press the spacebar. Press the spacebar again. Notice that with each press of the spacebar, you advance one full page into the displayed directory contents. Press the h key to get a help screen. Examine the command options, and then press q to return to the command output.

7 Press the (up arrow) key. Press again. Press once more. Notice that each time you press the key, you go up one line in the file display toward the beginning of the file. Now, press the (down arrow) key. Press again. Press once more. Notice that each time you press the key, you move forward into the file display

8 Press the q key to quit the less command and return to a shell command prompt.

9 At the command prompt, type cd and press Enter. At the command prompt, type pwd and press Enter. What is your current working directory? At the command prompt, type ls and press Enter

10 At the command prompt, type ls /etc and press Enter. How does this output compare with what you saw in Step 9? Has your current directory changed? Verify your answer by typing pwd at the command prompt and press Enter. Notice that you were able to list the contents of another directory by giving the absolute name of it as an argument to the ls command without leaving the directory in which you are currently located

11 At the command prompt, type ls /etc/skel and press Enter. Did you see a listing of any files? At the command prompt, type ls -a /etc/skel and press Enter. What is special about these files? What do the first two entries in the list ( . and .. ) represent

12 At the command prompt, type ls -aF /etc/skel and press Enter. Which file types are available in the /etc/skel directory

13 At the command prompt, type ls /bin and press Enter. Did you see a listing of any files? At the command prompt, type ls -F /bin/* and press Enter. What file types are present in the /bin directory

14 At the command prompt, type ls /boot and press Enter. Next, type ls l /boot and press Enter. What additional information is available on the screen? What types of files are available in the /boot directory? At the command prompt, type ll /boot and press Enter. Is the output any different from that of the ls l /boot command you just entered? Why or why not?

15 At the command prompt, type file /etc and press Enter. What kind of file is etc?

16 At the command prompt, type file /etc/inittab and press Enter. What type of file is /etc/inittab

17 At the command prompt, type file /boot/* to see the types of files in the /boot directory. Is this information more specific than the information you gathered in Step 14?

18 Type exit and press Enter to log out of your shell

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions