ls -l report.txt begins with -rw-r-----.
Determine the owner, group, and other permissions.
Which combination is correct?
-rw-r----- denotes a regular file with owner rw-, group r--, and others ---.
Detailed explanation
Correct. The owner can read and write, the group can read, and others have no permissions.
Correct. The owner can read and write, the group can read, and others have no permissions.
Incorrect. The mode does not give the group write or others execute.
Incorrect. The mode does not give the group write or others execute.
Incorrect. The group does not have write permission and others do not have read permission.
Incorrect. The group does not have write permission and others do not have read permission.
Incorrect. Only the owner and group have read permission in this mode.
Incorrect. Only the owner and group have read permission in this mode.
Try it yourself
An example you can run in a temporary verification environment.
tmp=$(mktemp); chmod 640 "$tmp"; stat -c '%A %a' "$tmp"; rm -f "$tmp"Expected result
-rw-r----- 640Key points
- The first character is the file type
- Owner, group, other follow
- r=4, w=2, x=1
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.