Linux Questions & Answers – Linux Commands – 3

This set of Linux / Unix questions and answers focuses on various Unix administration commands. It will be useful for anyone learning basic Unix Administration.

1. Command used to determine the path of an executable file is
a) which
b) where
c) wexec
d) what
View Answer

Answer: a
Explanation: None.

2. Command used to count number of character in a file is
a) grep
b) wc
c) count
d) cut
View Answer

Answer: b
Explanation: None.

3. Which of these commands could you use to show one page of output at a time?
a) less
b) sed
c) pause
d) grep
View Answer

Answer: a
Explanation: None.
advertisement
advertisement

4. Which commands will give you information about how much disk space each file in the current directory uses?
a) ls -l
b) ls -la
c) du
d) ls -a
View Answer

Answer: c
Explanation: None.

5. Which of the following command output contains userid?
a) ls
b) help
c) date
d) ls –l
View Answer

Answer: d
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which command is used to display all the files including hidden files in your current and its subdirectories ?
a) ls –aR
b) ls –a
c) ls –R
d) ls –l
View Answer

Answer: a
Explanation: None.

7. Which of the following commands can be used to copy files across systems?
a) ssh
b) telnet
c) rsh
d) ftp
View Answer

Answer: d
Explanation: None.
advertisement

8. pwd command displays
a) user password
b) password file content
c) present working directory
d) none of the mentioned
View Answer

Answer: c
Explanation: None.

9. Which of the following commands can be used to change default permissions for files and directories at the time of creation
a) Chmod
b) Chown
c) Umask
d) Chgrp
View Answer

Answer: c
Explanation: None.
advertisement

10. Which tar command option is used to list the files in a tape archive format?
a) cvf
b) tvf
c) xvf
d) ovf
View Answer

Answer: b
Explanation: None.

11. Which of the following commands will allow the user to search contents of a file for a particular pattern
a) touch
b) grep
c) find
d) ls
View Answer

Answer: b
Explanation: None.

Sanfoundry Global Education & Learning Series – Linux Administration & Programming.

Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.

To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.