exam questions

Exam 101-500 All Questions

View all questions & answers for the 101-500 exam

Exam 101-500 topic 1 question 52 discussion

Actual exam question from LPI's 101-500
Question #: 52
Topic #: 1
[All 101-500 Questions]

What is true regarding the command
ls > files
if files does not exist?

  • A. The output of ls is printed to the terminal
  • B. files is created and contains the output of ls
  • C. An error message is shown and ls is not executed
  • D. The command files is executed and receives the output of ls
  • E. Any output of ls is discarded
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ninymo
3 months, 3 weeks ago
Answer: B
upvoted 1 times
...
Lazylinux
2 years, 2 months ago
Selected Answer: B
yep it is Bee
upvoted 2 times
...
Untaked
2 years, 3 months ago
B root@LAPTOP-57VPBVH8:~# ls > files root@LAPTOP-57VPBVH8:~# ls README.md files root@LAPTOP-57VPBVH8:~# cat files README.md files
upvoted 3 times
...
tzahi
2 years, 3 months ago
Selected Answer: B
Simple redirection: > Will write stdout to a file ( if the file exists it will overwrite it) >> Will append stdout to a file ( write to next line after the original data ends ) Both will create the file is it doesn't exist
upvoted 3 times
...
ebo07
2 years, 6 months ago
B is correct. Tested on Xubuntu
upvoted 1 times
...
CuriousLinuxCat
3 years ago
B is the correct answer. Confirmed with CoCalc website running Ubuntu.
upvoted 2 times
...
jegga
3 years, 1 month ago
B is the correct answer confirmed on RedHat
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago