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 LFCS Exam - Topic 1 Question 113 Discussion

Which of the following commands redirects the output of cmd to the file foo.txt, in which an existing file is overwritten?
E) cmd > foo.txt
A) cmd || foo.txt
B) cmd | foo.txt
C) cmd && foo.txt
D) cmd >> foo.txt

Linux Foundation LFCS Exam - Topic 1 Question 113 Discussion

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

Which of the following commands redirects the output of cmd to the file foo.txt, in which an existing file is overwritten?

Show Suggested Answer Hide Answer
Suggested Answer: E

Contribute your Thoughts:

0/2000 characters
Kanisha
1 day ago
I remember learning that E) is the correct syntax for redirection.
upvoted 0 times
...
Cherelle
6 days ago
I was unsure at first, but E makes sense for overwriting.
upvoted 0 times
...
Ming
11 days ago
I feel confident about this question. E is definitely the right choice.
upvoted 0 times
...
Kenia
17 days ago
Yeah, I agree! It's straightforward.
upvoted 0 times
...
Keneth
22 days ago
I think it's E) cmd > foo.txt. It overwrites the file.
upvoted 0 times
...
Tawny
27 days ago
Same here! E is straightforward for redirection.
upvoted 0 times
...
Elroy
1 month ago
I remember using E in my projects. Works every time!
upvoted 0 times
...
Jenise
1 month ago
Right? The others don't overwrite. They append or do nothing.
upvoted 0 times
...
Leonor
1 month ago
I feel confused about the other options though.
upvoted 0 times
...
Reed
2 months ago
Agreed! E is the correct choice. Simple and effective.
upvoted 0 times
...
Veronica
2 months ago
I think it's E) cmd > foo.txt. It overwrites the file.
upvoted 0 times
...
Veronica
2 months ago
Yeah, E is the standard for that.
upvoted 0 times
...
Linn
2 months ago
Nope, D is for appending, not overwriting!
upvoted 0 times
...
Colette
2 months ago
Wait, are you sure? I thought it was D) cmd >> foo.txt.
upvoted 0 times
...
Mammie
2 months ago
Totally agree, that's the right one!
upvoted 0 times
...
Mayra
3 months ago
It's E) cmd > foo.txt for overwriting.
upvoted 0 times
...
Coletta
3 months ago
I think "cmd || foo.txt" is definitely not the right answer, but I can't remember what it does exactly.
upvoted 0 times
...
Jolanda
4 months ago
I keep mixing up the symbols! I know ">>" appends, but I can't recall if ">" is the one that overwrites.
upvoted 0 times
...
Linwood
5 months ago
I remember practicing with output redirection, and I feel like "cmd > foo.txt" is the right choice for overwriting.
upvoted 0 times
...
King
5 months ago
I think the command that overwrites the file is the one with a single greater than sign, but I'm not completely sure.
upvoted 0 times
...

Save Cancel