nerdexam
LPI

010-150 · Question #74

Which of the following commands can be used to create a file?

The correct answer is A. touch. The touch command is the standard Linux utility for creating empty files or updating file timestamps.

Finding Your Way on a Linux System

Question

Which of the following commands can be used to create a file?

Options

  • Atouch
  • Bbuild
  • Cnico
  • Dcreate
  • Emkfile

How the community answered

(41 responses)
  • A
    80% (33)
  • B
    5% (2)
  • C
    2% (1)
  • D
    2% (1)
  • E
    10% (4)

Why each option

The touch command is the standard Linux utility for creating empty files or updating file timestamps.

AtouchCorrect

The touch command, part of GNU coreutils, creates a new empty file if the specified filename does not already exist, and updates the access and modification timestamps if it does. It is the canonical way to quickly create an empty file on a Linux system without a text editor.

Bbuild

build is not a standard Linux command for file creation - it is associated with build systems or project compilation tools.

Cnico

nico is not a recognized standard Linux command for any purpose.

Dcreate

create is not a standalone standard Linux shell command for file creation.

Emkfile

mkfile is a command found on macOS and some BSD systems but is not a standard utility included in Linux distributions.

Concept tested: Linux file creation using the touch command

Source: https://www.gnu.org/software/coreutils/manual/html_node/touch-invocation.html

Topics

#touch command#file creation#basic file operations

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice