BlackFriday 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
1 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
1 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
1 months ago
Haha, option B is just hilariously wrong. How would you even do that?
upvoted 0 times
...
Deja
1 months ago
Hmm, option D looks interesting. Sending both streams to the same place is an elegant solution.
upvoted 0 times
Britt
12 days ago
Option D it is then!
upvoted 0 times
...
Earleen
15 days ago
I agree, it's an elegant solution.
upvoted 0 times
...
Lindsey
17 days ago
Yeah, sending both streams to the same place seems like a good idea.
upvoted 0 times
...
Charlene
24 days ago
I think option D is the correct one.
upvoted 0 times
...
...
Lorenza
1 months ago
I disagree, I believe the correct answer is A) command >2>file 1&>/dev/null.
upvoted 0 times
...
Thersa
1 months ago
I think the answer is E) command >file 2>/dev/null.
upvoted 0 times
...
Onita
2 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
6 days ago
Yes, it helps keep the file clean and only contains the desired output.
upvoted 0 times
...
Hana
7 days ago
That makes sense, it's important to separate the normal output from the error output.
upvoted 0 times
...
Lashawn
15 days ago
I agree, redirecting stdout to the file and stderr to /dev/null is the way to go.
upvoted 0 times
...
Alesia
1 months ago
I think option E is the correct answer.
upvoted 0 times
...
...
Luis
2 months ago
Option A seems the most straightforward way to redirect both the normal output and error output.
upvoted 0 times
Kaitlyn
1 months ago
I agree, Option A is the most efficient way to handle the output and error redirection.
upvoted 0 times
...
Kaitlyn
1 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