Deal of The Day! 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 9 Question 92 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 92
Topic #: 9
[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:

Justine
19 days ago
I think A is the correct answer because it redirects the error output to /dev/null while writing the normal output to a file.
upvoted 0 times
...
Dallas
21 days ago
But option E doesn't redirect the error output to /dev/null, so it might not be the best choice.
upvoted 0 times
...
Rolland
24 days ago
I disagree, I believe the correct answer is E) command >file 2>/dev/null.
upvoted 0 times
...
Fausto
26 days ago
Wait, is this a trick question? I bet the real answer is to just use a magic spell to make the errors disappear!
upvoted 0 times
Jutta
1 days ago
B) command < output > /dev/null
upvoted 0 times
...
Bette
6 days ago
No, it's not a trick question. You can redirect the error output to /dev/null to discard it.
upvoted 0 times
...
Kristian
14 days ago
E) command >file 2>/dev/null
upvoted 0 times
...
Rozella
15 days ago
A) command >2>file 1&>/dev/null
upvoted 0 times
...
...
Linn
1 months ago
Ha, B is like trying to put the cart before the horse! You can't redirect the output before you even run the command.
upvoted 0 times
Mona
13 days ago
E) command >file 2>/dev/null
upvoted 0 times
...
Ashanti
22 days ago
A) command >2>file 1&>/dev/null
upvoted 0 times
...
...
Dallas
1 months ago
I think the answer is A) command >2>file 1&>/dev/null.
upvoted 0 times
...
Ilda
1 months ago
D looks interesting, but I'm not sure if '2&>1' is the right way to redirect the error output. Hmm, need to double-check that.
upvoted 0 times
...
Clorinda
1 months ago
I think E is the correct answer. Sending the output to a file and discarding the error output is a classic Unix trick.
upvoted 0 times
Oneida
7 days ago
I've used A before and it works perfectly for redirecting output while discarding errors.
upvoted 0 times
...
Kris
19 days ago
Really? I always thought it was E) command >file 2>/dev/null
upvoted 0 times
...
Melissia
22 days ago
No, it's actually A) command >2>file 1&>/dev/null
upvoted 0 times
...
Walker
27 days ago
I think E is the correct answer. Sending the output to a file and discarding the error output is a classic Unix trick.
upvoted 0 times
...
...
Altha
1 months ago
Option A looks good, but I'm not sure about the syntax with the '2>' part. Seems a bit confusing.
upvoted 0 times
Donte
12 days ago
I agree with Option A. It's the correct syntax to write the normal output to a file and discard the error output.
upvoted 0 times
...
Lenna
17 days ago
Option A is the right choice. It redirects the error output to a file while discarding the normal output.
upvoted 0 times
...
Candra
20 days ago
I think Option E is the correct one. It redirects the normal output to a file and discards the error output.
upvoted 0 times
...
Junita
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