Question 3 — AZ-104 Practice Exam 14
You need to list all files in /etc, including hidden ones, and display them in long format. Which command achieves this in the most concise way? (Select one answer)
ls -al /etc
ls /etc
ls --help
ls -a -l /etc
Correct answers
ls -al /etc
Explanations
Correct:
ls -al /etc: Combines -a and -l flags concisely to show all files, including hidden ones, in long format.
Wrong:
ls -a -l /etc: This works but isn’t the most concise option.
ls /etc: Lists files but omits hidden files and long format.
ls --help: Displays help, not directory contents.