TestOut Linux Pro Practice Test 2025 – All-in-One Guide to Master Your Certification!

Question: 1 / 400

What command would you use to change group ownership of the /hr directory and all its contents to hr?

chown -R :hr /hr

chgrp -R hr /hr

The command that changes group ownership of the /hr directory and all its contents to hr is correctly identified as chgrp -R hr /hr. This command specifically targets the group ownership without altering the user ownership, which is an important distinction.

Using the -R flag enables recursive changes, ensuring that all files and subdirectories within /hr inherit the new group ownership. This is crucial in a directory structure where you want to maintain consistent group permissions across all contained items.

While the other options involve different commands or functionalities that don’t achieve the goal of changing group ownership, this choice succinctly meets the requirement and best practices for managing group permissions within the Linux filesystem.

Get further explanation with Examzify DeepDiveBeta

chmod -R hr /hr

mv /hr /hr_backup

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy