Module 4 Test Flashcards

1
Q

Lynn runs the locate command and the results include many files from a directory that she doesn’t want to include in her search. Which of the following files could Lynn modify so that the locate command no longer includes those results?

a. /etc/locate.d/updatedb.conf

b. /etc/locate.conf

c. /etc/updatedb.conf

d. /etc/locatedb.conf

A

c. /etc/updatedb.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for projectx. However, this is the first project she has worked on in 2019 and the 2019projects directory does not exist yet. Which of the following commands will create the higher level directories if they do not already exist?

a. mkdir -r ~/2019projects/project/projectplans

b. mkdir -p ~/2019projects/project/projectplans

c. mkdir –all ~/2019projects/project/projectplans

d. mkdir -v ~/2019projects/project/projectplans

A

b. mkdir -p ~/2019projects/project/projectplans

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following commands can be used to update the last modified timestamp on a file, or if the file specified does not exist will create the file?

a. update file.txt	
b. updatets file.txt	
c. touch file.txt	
d. stamp file.txt
A

c. touch file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following commands will delete a directory and all of the files contained within it? (Choose all that apply.)

a. rm olddir	
b. rmdir olddir	
c. rm -rf olddir	
d. rmdir -rf olddir
A

c. rm -rf olddir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following umask settings will result in new files receiving the default permissions -rw——-?

a. 0177	
b. 0600	
c. 0188	
d. 0688
A

a. 0177

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What would be the result of running the command chown :root file1.txt

a. This would set the owner of file1.txt to root.

b. This would set the group ownership of file1 to root.

c. This would set the owner and group ownership of file1 to root.

d. This would keep the current ownership of the file, and add root as a second owner of the file.

A

b. This would set the group ownership of file1 to root.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following permissions would show for a symbolic link when displayed with the ls -l command?

a. -rw-r--r--	
b. srwxrwxrwx	
c. lrwxrwxrwx	
d. srw-r--r--
A

c. lrwxrwxrwx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following commands will create a symbolic link named foo.txt to an original file named bar.txt

a. ln bar.txt foo.txt	
b. ln foo.txt bar.txt	
c. ln -s bar.txt foo.txt	
d. ln -h foo.txt bar.txt
A

c. ln -s bar.txt foo.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly