nerdexam
CompTIACompTIA

XK0-005 · Question #1204

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

The correct answer is B: bzip2 -c /vm/mktg.img | dd of=/dev/hdb. {"question_number": 4, "question": "A raw VM image is being compressed with bzip2 and copied directly to a flash drive device (/dev/hdb) for off-site use.", "correct_answer": "B", "explanation": "Option B is correct: 'bzip2 -c /vm/mktg.img' compresses the image and writes the com

System Management

Question

A raw VM image is being compressed with bzip2 and copied to a flash drive at /dev/hdb for off- site use by the marketing department. Which of the following command lines accomplishes this task?

Options

  • Amv /vm/mkgt.img | bzip2 /dev/hdb/mkgt.img.bz2
  • Bbzip2 -c /vm/mktg.img | dd of=/dev/hdb
  • Ccp /vm/mktg.img | bzip2 /dev/hdb/mktg.img.bz2
  • Dcp -a -r /vm/mktg.img bzip2 /dev/hdb/mktg.img.zip

Explanation

{"question_number": 4, "question": "A raw VM image is being compressed with bzip2 and copied directly to a flash drive device (/dev/hdb) for off-site use.", "correct_answer": "B", "explanation": "Option B is correct: 'bzip2 -c /vm/mktg.img' compresses the image and writes the compressed data to standard output (the -c flag). This output is piped to 'dd of=/dev/hdb', which writes the raw bytes directly to the block device. This is the correct way to compress and write an image to a raw device in one step. Options A and C misuse 'mv' and 'cp' - these commands do not write to stdout, so piping them is invalid. Option D treats 'bzip2' as a directory path argument to 'cp', which is entirely incorrect syntax.", "generated_by": "claude-sonnet", "llm_judge_score": 3}

Topics

#bzip2#dd#Piping#Device management

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions