Interview Questions

Which of the following commands will show a list of the files in your home directory including hidden files and the contents of all subdirectories?

Operating System Interview Questions and Answers


(Continued from previous question...)

Which of the following commands will show a list of the files in your home directory including hidden files and the contents of all subdirectories?

Which of the following commands will show a list of the files in your home directory including hidden files and the contents of all subdirectories?
Choose one:
a. ls -c home
b. ls -aR /home/username
c. ls -aF /home/username
d. ls -l /home/username


Answer: b
The ls command is used to display a listing of files. The -a option will cause hidden files to be displayed as well. The -R option causes ls to recurse down the directory tree. All of this starts at your home directory.

(Continued on next question...)

Other Interview Questions