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

LPI Exam 101-500 Topic 2 Question 89 Discussion

Actual exam question for LPI's 101-500 exam
Question #: 89
Topic #: 2
[All 101-500 Questions]

Which of the following commands redirects the output of ls to standard error?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Gregg
6 months ago
E) ls |error - now that's just asking for trouble. I'd rather not pipe my output into an unknown abyss, thank you very much.
upvoted 0 times
...
Davida
6 months ago
D) ls >>2 - really? Writing to file descriptor 2? That's just silly, we all know the correct answer is C.
upvoted 0 times
Salena
5 months ago
C) ls >&2
upvoted 0 times
...
Esteban
5 months ago
A) ls >-1
upvoted 0 times
...
...
Sabine
6 months ago
Ah, the old 'redirect to standard error' trick. I've used that one before when I wanted to hide my mistakes from the boss.
upvoted 0 times
Billy
5 months ago
E) ls |error
upvoted 0 times
...
Annabelle
5 months ago
Oh yeah, that's the one you use to redirect to standard error.
upvoted 0 times
...
Louis
6 months ago
C) ls >&2
upvoted 0 times
...
...
Armando
6 months ago
I agree with Twila, because >&2 redirects output to standard error.
upvoted 0 times
...
Twila
6 months ago
I think the answer is C) ls >&2.
upvoted 0 times
...
Thea
6 months ago
C) ls >&2 is the correct answer. It redirects the output of ls to standard error.
upvoted 0 times
Beckie
5 months ago
No problem, happy to help!
upvoted 0 times
...
Letha
5 months ago
Great, thanks for the clarification!
upvoted 0 times
...
Mozell
5 months ago
Great, thanks for the clarification!
upvoted 0 times
...
Georgeanna
5 months ago
C) ls >&2 is the correct answer.
upvoted 0 times
...
Francene
6 months ago
Great, thanks for the clarification!
upvoted 0 times
...
Evangelina
6 months ago
C) ls >&2 is the correct answer.
upvoted 0 times
...
Daniela
6 months ago
C) ls >&2 is the correct answer.
upvoted 0 times
...
...

Save Cancel