Interview Questions

If you type the command cat dog & > cat what would you see on your display?

Operating System Interview Questions and Answers


(Continued from previous question...)

If you type the command cat dog & > cat what would you see on your display?

If you type the command cat dog & > cat what would you see on your display? Choose one:
a. Any error messages only.
b. The contents of the file dog.
c. The contents of the file dog and any error messages.
d. Nothing as all output is saved to the file cat.

d

When you use & > for redirection, it redirects both the standard output and standard error. The output would be saved to the file cat.

(Continued on next question...)

Other Interview Questions