Study for the TestOut Linux Pro Exam with our engaging quiz. Prepare using our flashcards and comprehensive multiple choice questions, each with hints and explanations to help you succeed. Get ready for your Linux certification today!

Practice this question and more.


Which command can be used to verify all permissions in the /hr directory?

  1. ls -l /hr

  2. ls -a /hr

  3. ls /hr

  4. ls -r /hr

The correct answer is: ls -l /hr

The command that effectively verifies all permissions in the /hr directory is "ls -l /hr". This command provides a detailed list of files and subdirectories within the specified directory, displaying their permissions, ownership, size, and modification date in a long format. When you execute "ls -l", it breaks down the permissions for the user, group, and others for each entry in the directory. The output begins with a character that indicates the type of file (such as a directory or a regular file), followed by a string of ten characters that show the permission settings: read, write, and execute for the owner, group, and others respectively. This detailed output is essential for understanding access control in the Linux filesystem. The other options serve different purposes. "ls -a /hr" lists all files, including hidden files that begin with a dot, but does not provide detailed permission information. "ls /hr" shows a simple list of the files and directories without any additional details, and "ls -r /hr" lists the contents of the directory in reverse order, also without permission details. Hence, only "ls -l /hr" provides the full view of permissions that is needed to verify access settings.