Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following commands is/are used to create files in Linux?

Commands:
i) touch
ii) cat
iii) head
iv) finger

  • A.i, ii and iii only
  • B.ii, iii and iv only
  • C.i and ii only
  • D.i only

Answer: C

The commands that create files in Linux are touch and cat, so i and ii only. The touch command creates an empty file, and cat can create a file with redirection, as in cat > file. The head command shows the first lines of a file and finger shows information about users, so iii and iv do not create files. The options with them, or with only one command, are wrong. For example touch notes.txt creates an empty file, and cat > notes.txt lets the user type text into a new file.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.