Difficulty: Easy
Correct Answer: chmod u+x emp[1-3]
Explanation:
Introduction / Context:
Managing permissions in Unix/Linux often involves applying changes to sets of files selected by shell globs. Understanding chmod symbolic modes and bracket patterns ensures precise, minimal changes to the correct targets without over-permissive settings.
Given Data / Assumptions:
Concept / Approach:
The shell glob emp[1-3] matches exactly the names ending in 1, 2, or 3. The chmod symbolic form u+x adds execute permission to the owner without altering group or others. Combining them gives chmod u+x emp[1-3], which is specific and safe.
Step-by-Step Solution:
Verification / Alternative check:
Run stat emp1 before and after to confirm mode changes only for the user execute bit. If scripts are in these files, test execution with ./emp1 (assuming proper shebang and path).
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
chmod u+x emp[1-3].
Discussion & Comments