Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam LFCS topic 1 question 43 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 43
Topic #: 1
[All LFCS Questions]

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

  • A. The stdout from the command foo is appended to the file bar.
  • B. The stdout from the command foo overwrites the file bar.
  • C. The command foo receives its stdin from the file bar.
  • D. The command foo receives its stdin from the stdout of the command bar.
  • E. The stderr from the command foo is saved to the file bar.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Buruguduystunstugudunstuy
1 year, 3 months ago
Selected Answer: B
The correct statement regarding the command 'foo 1> bar' is that the stdout from the command 'foo' overwrites the file 'bar'. Option B is the correct answer. In Bash, the '>' symbol is used to redirect output from a command to a file. The number '1' specifies the standard output file descriptor. Therefore, the command 'foo 1> bar' redirects the standard output of the command 'foo' to the file 'bar', overwriting the file if it already exists. The other statements are not correct: Option A: The stdout from the command 'foo' is not appended to the file 'bar'. It overwrites the file. Option C: The command 'foo' does not receive its stdin from the file 'bar'. Option D: The command 'foo' does not receive its stdin from the stdout of the command 'bar'. Option E: The stderr from the command 'foo' is not saved to the file 'bar'. To redirect the stderr of a command to a file, you can use the command 'foo 2> bar'.
upvoted 1 times
...
Borbz
3 years ago
Correct. 0 - stdin 1 - stdout 2 - stderr
upvoted 2 times
Borbz
3 years ago
> replaces >> Appends
upvoted 4 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...