Question: In this hands-on project, you use the ls command alongsidewildcard metacharacters in your shell to explore the contents ofyour home directory. 1. Switch to a

In this hands-on project, you use the ls command alongsidewildcard metacharacters in your shell to explore the contents ofyour home directory.


1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2and log in to the terminal using the user name of root and thepassword of LNXrocks!.

2. At the command prompt, type pwd, press Enter, and ensure/root is displayed showing that you are in the root user’s homefolder. At the command prompt, type ls. How many files with a namebeginning with the word “sample” exist in /root?

3. At the command prompt, type ls * and press Enter. What islisted and why?

4. At the command prompt, type ls sample and press Enter. Whatis listed and why?

5. At the command prompt, type ls sample? and press Enter. Whatis listed and why?

6. At the command prompt, type ls sample?? and press Enter. Whatis listed and why?

7. At the command prompt, type ls sample[13] and press Enter.What is listed and why?

8. At the command prompt, type ls sample[!13] and press Enter.What is listed and why? How does this compare to the results fromStep 7?

9. At the command prompt, type ls sample[1-3] and press Enter.What is listed and why?

10. At the command prompt, type ls sample[!1-3] and press Enter.What is listed and why? How does this compare to the results fromStep 9?

11. Type exit and press Enter to log out of your shell.

( Book name: Linux Plus Guide to Certification FourthEdition

by Jason W. Eckert Chapter 03. Project 3-6 )

Send me the output with screenshot

Step by Step Solution

3.48 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer 1 I used sudo su root to login to the root account As i didnt have the direct access to my li... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!