Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project 4 - 5 ESTIMATED TIME: 1 5 minutes OBJECTIVE: Find system files. DESCRIPTION: In this hands - on project, you find files on the

Project 4-5
ESTIMATED TIME: 15 minutes
OBJECTIVE: Find system files.
DESCRIPTION: 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 Ctrl+Alt+F5 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? 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?
10
At the command prompt, type find /root type l and press Enter. What files are listed?
11
At the command prompt, type find /root size 0 and press Enter. What types of files are listed? Type find /size 0| less 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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

Describe several strategies for relieving stress.

Answered: 1 week ago