Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 From YOUR home directory, execute a find command string that will loc

ID: 3891532 • Letter: Q

Question

QUESTION 1

From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the /etc directory.

Select the correct find command string below that will accomplish this.

find /etc -name 'resolv.conf' -cat {} ;

find /etc -name 'resolv.conf' -exec cat {} ;

find . -name 'resolv.conf' -exec cat {} ;

find / -name 'resolv.conf' -exec cat {} ;

10 points   

QUESTION 2

What find command option (flag) will allow you to specify you are searching for a directory?

-dir

-D

-type d

-size

10 points   

QUESTION 3

What does the -ok flag do for the find command?

Checks if you are okay?

Like -exec, except that the generated command line is printed with a question mark first, and is executed only if the user responds by typing y.

Match a specified number of links.

Nothing. It is not a valid find command option.

10 points   

QUESTION 4

Copy file called sortfile from my home directory. The file contains three columns of information : username, uid number and group name respectively, separated by a field separator.

Will the following command sort the file on the group name field?

sort -t! -k3 sortfile

Yes
No

10 points   

QUESTION 5

Copy the file called sortfile from my home directory. The file contains three columns of information : username, uid number and group name respectively, separated by a field separator.

The following command will reverse sort the the file numerically on the uid.

sort -t! -k2rn sortfile

True

False

10 points   

QUESTION 6

Using the tar command, tar the directory called midterm located in my home directiry. Create a tar file called midterm.tar. What is the size of the file called midterm.tar in bytes?

10 points   

QUESTION 7

cd to my home directory.

Name one of the files that are contained within the tar file called accounts.tar.

10 points   

QUESTION 8

cd to my home directory.

How many files are archived within the tar file called accounts.tar?

10 points   

QUESTION 9

Using the ps -ef command, locate the process with a PID of 1.

What is the process called?

pageout

/sbin/init

/usr/sbin/nscd

inetd

10 points   

QUESTION 10

What is the Parent Process ID of the process called kdmflush?

The PPID is ____

find /etc -name 'resolv.conf' -cat {} ;

find /etc -name 'resolv.conf' -exec cat {} ;

find . -name 'resolv.conf' -exec cat {} ;

find / -name 'resolv.conf' -exec cat {} ;

Explanation / Answer

Please Note: Your Post contains more than one Question. According to Chegg answering guidelines, I have answered the first question. Please Re-Post for others.

QUESTION 1

From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the /etc directory.

Select the correct find command string below that will accomplish this.

find /etc -name 'resolv.conf' -cat {} ;

find /etc -name 'resolv.conf' -exec cat {} ;

find . -name 'resolv.conf' -exec cat {} ;

find / -name 'resolv.conf' -exec cat {} ;

Answer)

First we have to use a find command from /etc directory, to locate the file called resolv.conf. We also have to include the -exec flag in the find command to cat the file to the screen.

The correct option for achieving the above will be:

find /etc -name 'resolv.conf' -exec cat {} ;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote