101-400 Exam QuestionsBrowse all questions from this exam

101-400 Exam - Question 37


Which of the following statements is correct regarding the command foo 1> bar?

Show Answer
Correct Answer: B

The stdout from the command 'foo' overwrites the file 'bar'. The syntax '1>' is used in shell commands to redirect the standard output (stdout) to a file, and if the file already exists, it is overwritten.

Discussion

1 comment
Sign in to comment
DuboisNicolasDuclairOption: B
Oct 21, 2023

The correct statement regarding the command `foo 1> bar` is: B. The stdout from the command foo overwrites the file bar. In this command, `1>` is used to redirect the standard output (stdout) of the command `foo` to the file `bar`. If the file `bar` already exists, its previous content is overwritten with the stdout of the `foo` command.