CompTIA Linux+ (XK0-005) — Question 291
A security technician receives a report of a suspected phishing email with an attachment named payroll.csv. The technician downloads and saves the attachment but wants to verify the attachment type before opening it. Which of the following commands should the technician use to verify the attachment type?
Answer options
- A. file payroll.csv
- B. df payroll.csv
- C. cat payroll.csv
- D. tree payroll.csv
Correct answer: A
Explanation
The correct command to verify the type of a file is 'file payroll.csv', as it analyzes the file's content and provides information about its format. The 'df' command is used to report disk space usage, 'cat' displays the file content, and 'tree' shows directory structure, none of which are suitable for checking the file type.