nerdexam
CompTIA

XK0-005 · Question #173

An administrator needs to create a file named hello in the home directory that contains the following text: it's me! Which of the following commands would accomplish this goal?

The correct answer is B. touch ~/hello. task 1: Create a file named hello in the home directory. Task 2: the hello file must contain the text "it's me!". # echo "it's me!" > ~/hello

System Management

Question

An administrator needs to create a file named hello in the home directory that contains the following text:

it's me! Which of the following commands would accomplish this goal?

Options

  • Amkdir ~/hello
  • Btouch ~/hello
  • Cmv ~/hello
  • Dtype ~/hello

How the community answered

(39 responses)
  • A
    5% (2)
  • B
    90% (35)
  • C
    3% (1)
  • D
    3% (1)

Explanation

task 1: Create a file named hello in the home directory. Task 2: the hello file must contain the text "it's me!". # echo "it's me!" > ~/hello

Topics

#file creation#Linux commands#filesystem management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice