Change the owner of report.txt to alice.
Keep its current owning group.
Which command is appropriate?
When GNU chown specifies only OWNER, it changes the owner while leaving the owning group unchanged.
Detailed explanation
chown alice report.txtCorrect. chown alice report.txt changes only the file owner.
Correct. chown alice report.txt changes only the file owner.
chgrp alice report.txtIncorrect. chgrp changes the owning group.
Incorrect. chgrp changes the owning group.
chmod alice report.txtIncorrect. chmod changes permission bits, not ownership.
Incorrect. chmod changes permission bits, not ownership.
chown :alice report.txtIncorrect. chown :alice changes the group to alice and leaves the owner unchanged.
Incorrect. chown :alice changes the group to alice and leaves the owner unchanged.
Try it yourself
An example you can run in a temporary verification environment.
chown --helpExpected result
chown [OPTION]... [OWNER][:[GROUP]] FILE...Key points
- Specify only OWNER
- The group is preserved
- Appropriate privileges are required
Notes
- Environment: GNU coreutils 9.x
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.