nerdexam
CompTIACompTIA

XK0-005 · Question #1591

XK0-005 Question #1591: Real Exam Question with Answer & Explanation

The correct answer is A: file filename. {"question_number": 2, "question": "A systems administrator is gathering information about a file type and the contents of a file.", "correct_answer": "A", "explanation": "The file command inspects a file's magic bytes and metadata to determine its type (e.g., ASCII text, ELF bin

System Management

Question

A systems administrator is gathering information about a file type and the contents of a file. Which of the following commands should the administrator use to accomplish this task?

Options

  • Afile filename
  • Btouch filename
  • Cgrep filename
  • Dlsof filename

Explanation

{"question_number": 2, "question": "A systems administrator is gathering information about a file type and the contents of a file.", "correct_answer": "A", "explanation": "The file command inspects a file's magic bytes and metadata to determine its type (e.g., ASCII text, ELF binary, JPEG image, Python script), and it also summarizes relevant content attributes. This is the correct tool for identifying both the file type and basic content characteristics. touch (B) only creates a file or updates its timestamps. grep (C) searches for patterns within file contents but does not identify the file type. lsof (D) lists open file descriptors by running processes, not file type or content information.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#file command#Linux commands#File system#Information gathering

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions