To create a new file without opening it, you can use the touch
command.
Option A) pico filename
- This option is incorrect because pico
is a text editor, not a command to create a new file without opening it.
Option B) cat filename
- This option is incorrect because cat
is a command used to display the contents of a file, not create a new file.
Option C) more filename
- This option is incorrect because more
is a command used to view a file one screen at a time, not create a new file.
Option D) touch filename
- This option is correct because the touch
command is used to create a new file without opening it. It updates the access and modification timestamps of the file, and if the file does not exist, it creates an empty file with the specified name.
The correct answer is Option D.