Valid XK0-005 Dumps shared by ExamDiscuss.com for Helping Passing XK0-005 Exam! ExamDiscuss.com now offer the newest XK0-005 exam dumps, the ExamDiscuss.com XK0-005 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com XK0-005 dumps with Test Engine here:
A Linux engineer has been notified about the possible deletion of logs from the file /opt/app/logs. The engineer needs to ensure the log file can only be written into without removing previous entries. Which of the following commands would be BEST to use to accomplish this task?
Correct Answer: A
The command chattr +a /opt/app/logs will ensure the log file can only be written into without removing previous entries. The chattr command is a tool for changing file attributes on Linux file systems. The +a option sets the append-only attribute, which means that the file can only be opened in append mode for writing. This prevents the file from being modified, deleted, or renamed. This is the best command to use to accomplish the task. The other options are incorrect because they either set the wrong attributes (+d, +i, or +c) or do not affect the file at all (-a). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 11: Managing Files and Directories, page 357.