Linux Quizzes 1

 


1. How could one search for the file foo.txt under the directory /home?

A. find /home -file foo.txt

B. search /home -file foo.txt

C. find /home foo.txt

D. find /home -name foo.txt

Answer:D

2. Which command line can be used to search help files that mention the word “copy”?

A. copy -help

B. whatis copy

C. man -k copy

D. man copy

Answer: C

3. What is the output of the following command? tail -n 20 test.txt

A. The first 20 lines of test.txt

B. The last 20 lines of test.txt including the blank lines

C. The last 20 lines of test.txt with line numbers

D. The last 20 lines of test.txt omitting the blank lines

Answer: B

4. Which of the following commands can be used to create a file?

A. create

B. nico

C. touch

D. build

Answer: C

5. Which command displays the list of groups to which a user belongs?

A. lsgroup

B. id

C. who

D. whoami

Answer: B

6. The following file is found in which system file? root:x:0:0:/root:/bin/bash

A. /etc/passwd

B. /etc/user.cong

C. /etc/shadow

D. /etc/password

Answer: A

7. What is the number called that is used to identify a process?

A. Proc Num

B. Process Entry

C. PID

D. PIN

Answer: C

8. Which Linux distribution is used as a basis for the creation of Ubuntu Linux?

A. Red Hat Linux

B. SUSE Linux

C. Gentoo Linux

D. Debian Linux

Answer: D

9. Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?

A. tar -cf /home backup.tar

B. tar /home backup.tar

C. tar -cf backup.tar /home

D. tar -xf backup.tar /home

Answer: C

10. You have a program called /user/bin/foo. You wish to create a symbolic link /home/user/foo, that points to it. Which command will do this task?

A. ln /home/user/foo /user/bin/foo

B. ln -s /user/bin/foo /home/user/foo

C. ln -sys /home/user/foo /user/bin/foo

D. ln /user/bin/foo /home/user/foo

Answer: B

Next Post Previous Post