Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam LFCS Topic 6 Question 84 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 84
Topic #: 6
[All LFCS Questions]

How can the normal output of a command be written to a file while discarding the error output?

Show Suggested Answer Hide Answer
Suggested Answer: E

Contribute your Thoughts:

German
2 months ago
I'm not sure, but I think Lorenza is right because redirecting the error output to /dev/null ensures it is discarded.
upvoted 0 times
...
Iola
2 months ago
I'm going to have to disagree with Deja on this one. Option A is the clearest and most reliable approach.
upvoted 0 times
...
Patti
2 months ago
Haha, option B is just hilariously wrong. How would you even do that?
upvoted 0 times
...
Deja
2 months ago
Hmm, option D looks interesting. Sending both streams to the same place is an elegant solution.
upvoted 0 times
Britt
2 months ago
Option D it is then!
upvoted 0 times
...
Earleen
2 months ago
I agree, it's an elegant solution.
upvoted 0 times
...
Lindsey
2 months ago
Yeah, sending both streams to the same place seems like a good idea.
upvoted 0 times
...
Charlene
2 months ago
I think option D is the correct one.
upvoted 0 times
...
...
Lorenza
3 months ago
I disagree, I believe the correct answer is A) command >2>file 1&>/dev/null.
upvoted 0 times
...
Thersa
3 months ago
I think the answer is E) command >file 2>/dev/null.
upvoted 0 times
...
Onita
3 months ago
I'm pretty sure option E is the correct answer here. Redirecting stdout to the file and stderr to /dev/null is the way to go.
upvoted 0 times
Maryanne
1 months ago
Yes, it helps keep the file clean and only contains the desired output.
upvoted 0 times
...
Hana
1 months ago
That makes sense, it's important to separate the normal output from the error output.
upvoted 0 times
...
Lashawn
2 months ago
I agree, redirecting stdout to the file and stderr to /dev/null is the way to go.
upvoted 0 times
...
Alesia
2 months ago
I think option E is the correct answer.
upvoted 0 times
...
...
Luis
3 months ago
Option A seems the most straightforward way to redirect both the normal output and error output.
upvoted 0 times
Kaitlyn
2 months ago
I agree, Option A is the most efficient way to handle the output and error redirection.
upvoted 0 times
...
Kaitlyn
3 months ago
Option A is correct. It redirects the error output to /dev/null while writing the normal output to a file.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77