Multiple choice technology operating systems

How do you creat a file without even opening it?

  1. more <filename>

  2. pico <filename>

  3. cat <filename>

  4. touch <filename>

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The touch command creates an empty file without opening it in any editor. It simply updates the file's timestamp if it exists, or creates a new empty file if it doesn't. This is the standard Unix/Linux way to quickly create files. The other commands (more, pico, cat) either open files for viewing or editing, or require piping content.

AI explanation

touch is correct — it's the standard Unix/Linux command specifically designed to create an empty file (or update timestamps on an existing one) without opening it in any editor or pager. more and cat are for viewing/displaying file contents (and would error or just return nothing on a non-existent file rather than creating it, depending on shell/redirection), and pico is a text editor that would open the file for editing, which is exactly what the question asks to avoid.