Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Linux please help Project 4-5 In this hands-on project, you find files on the filesystem using the find, locate, which, type, and whereis commands. Switch

Linux please help

Project 4-5

In this hands-on project, you find files on the filesystem using the find, locate, which, type, and whereis commands.

  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 touch newfile and press Enter. Next, type locate newfile at the command prompt and press Enter. Did the locate command find the file you just created? Why?

  3. At the command prompt, type updatedb and press Enter. When the command is finished, type locate newfile at the command prompt and press Enter. Did the locate command find the file? If so, how quickly did it find it? Why?

  4. At the command prompt, type find / -name "newfile" and press Enter. Did the find command find the file? If so, how quickly did it find it? Why?

  5. At the command prompt, type find /root -name "newfile" and press Enter. Did the find command find the file? How quickly did it find it? Why?

  6. At the command prompt, type which newfile and press Enter. Did the which command find the file? Why? Type echo $PATH at the command prompt and press Enter. Is the /root directory listed in the PATH variable? Is the /usr/bin directory listed in the PATH variable?

  7. At the command prompt, type which grep and press Enter. Did the which command find the file? Why?

  8. At the command prompt, type type grep and press Enter. Next, type whereis grep and press Enter. Do these commands return less or more than the which command did in the previous step? Why?

  9. At the command prompt, type find /root name "sample" and press Enter. What files are listed? Why?

  10. At the command prompt, type find /root type l and press Enter. What files are listed? Why?

  11. At the command prompt, type find /root size 0 and press Enter. What types of files are listed? Type find / size 0 | more to see all of the files of this type on the system.

  12. 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

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions