Exam 010-160 Topic 3 Question 1 Discussion

Actual exam question for Lpi's 010-160 exam
Question #: 1
Topic #: 3
What parameter of ls prints a recursive listing of a directory's content? (Specify ONLY the option name without any values or parameters.)

Suggested Answer:

ls -R Explanation The -R parameter of the ls command prints a recursive listing of a directory's content, meaning that it will list not only the files and directories in the current directory, but also the files and directories in all the subdirectories12. For example, if you have a directory structure like this:
/home/user/dir1file1file2dir2file3file4
You can use the command ls -R /home/user/ to list all the files and directories recursively, and the output will look like this:
/home/user/: dir1 dir2
/home/user/dir1: file1 file2
/home/user/dir2: file3 file4
The -R parameter is also known as the --recursive option, which is the long form of the same parameter12.
You can use either -R or --recursive to achieve the same result.
References:
* Use ls Command Recursively - Linux Handbook
* How to List Files Recursively in Linux command line

by Abigail at Feb 12, 2026, 07:49 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10