After rotation, create an empty log at the original path with mode 0640, owner app, and group adm.
Which directive is appropriate?
create MODE OWNER GROUP creates a new empty log with the specified attributes after rotation.
Detailed explanation
create 0640 app admCorrect. It creates the new log with the requested mode and ownership.
Correct. It creates the new log with the requested mode and ownership.
copy 0640 app admIncorrect. copy concerns content and does not use attributes this way.
Incorrect. copy concerns content and does not use attributes this way.
su 0640 app admIncorrect. su selects the user/group for rotation processing, not file mode.
Incorrect. su selects the user/group for rotation processing, not file mode.
chmod 0640 app admIncorrect. chmod changes mode but is not the create directive.
Incorrect. chmod changes mode but is not the create directive.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'create 0640 app adm' | awk '{print $1, $2, $3, $4}'Expected result
create 0640 app admKey points
- create makes a new file
- Order is mode, owner, group
- Preserve daemon write access
Notes
- Environment: POSIX awk / 模擬設定のみ
- 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.