nerdexam
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)
  • A
    4% (2)
  • B
    2% (1)
  • C
    84% (43)
  • D
    10% (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.

Full XK0-006 Practice