Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LOGIN to Student account: 1. We use the find program in this lab. We will start with some basic commands. At its most basic, the

image text in transcribed
LOGIN to Student account: 1. We use the find program in this lab. We will start with some basic commands. At its most basic, the command is used like this: find dir -name "string" where dir is the starting directory (the find command performs a search from that point down in the hierarchy) and string describes the filename to match again (wildcards can be included) a. Enter the command find /usr/sbin -name use* to locate all of the files (commands) in /usr/sbin (and any subdirectories) that start with use. What files were found? b. Enter a command to find all entries under etc that end with .conf as an extension. What instruction did you use? Pipe the result to we. How many entries were found? c. Redo the first command you entered in part b without the pipe and scroll through the results. You will find in some cases the response: Permission denied. Why would you get this error? 2. Aside from finding objects by name, you can locate objects based on creation, modification or a. The option-anewer filename will list all files that have been accessed more recently than DIRECTORY/filel.txt. [If you don't find file1.txt, then create a blank file named access date or time or size. Review the information on find in the textbook. filename Use the command find -anewer/DUMMY file1.txt] What is the response? b. The options-amin # and-cmin # find all files accessed or altered within the last minutes respectively. Switch to directory DUMMY-DIRECTORY. Now type find-cmin 1. No files should be listed. Now do echo "hi" > aa6.bbc. This command will change the status of the file aa6.bbe to have been altered. Repeat the find command. What happened? Similar to-amin and-cmin are-atime # and-ctime # where # is days instead of minutes as with amin and cmin. 3. To find items of a given size, use-size # where # will either be an integer, a-integer or a- integer. The + and-mean ..greater than" and "less than" respectively while # by itself means "exactly". After the integer, add'c' to indicate bytes, as in +100c for 100 bytes. a. Use a find command starting at Student to find items of size 0. What command did you enter? Now find all files greater than 1000c. What command did you us? How many results did you find (pipe the result to we -l) b. If you want to search for files within a range, you can combine tinteger and-integer using -size -a -size +b. Find all files in the Student FILES directory that are between 350 and 425 bytes. What command did you enter? What did you find

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

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

define EFFECTIVE PARTICIPATION

Answered: 1 week ago