CompTIA
XK0-006 · Question #20
A systems administrator wants to prevent the current contents of a file from being overwritten and wants to allow new additions at the end of the file. Which of the following commands should the…
The correct answer is C. chattr +a file. The chattr +a command sets the append-only attribute on a file. This prevents overwriting or deletion of existing contents, while still allowing new data to be appended to the end of the file.
System Configuration and Management
Question
A systems administrator wants to prevent the current contents of a file from being overwritten and wants to allow new additions at the end of the file. Which of the following commands should the administrator use?
Options
- Asetenforce file
- Bsetfacl -m m::t file
- Cchattr +a file
- Dchmod +t file
How the community answered
(51 responses)- A4% (2)
- B2% (1)
- C84% (43)
- D10% (5)
Explanation
The chattr +a command sets the append-only attribute on a file. This prevents overwriting or deletion of existing contents, while still allowing new data to be appended to the end of the file.
Topics
#chattr#append-only#file attributes#immutable flags
Community Discussion
No community discussion yet for this question.