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.
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)- A80% (33)
- B5% (2)
- C2% (1)
- D2% (1)
- E10% (4)
Why each option
The touch command is the standard Linux utility for creating empty files or updating file timestamps.
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.
build is not a standard Linux command for file creation - it is associated with build systems or project compilation tools.
nico is not a recognized standard Linux command for any purpose.
create is not a standalone standard Linux shell command for file creation.
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
Community Discussion
No community discussion yet for this question.