LPIC-1 Exam 101 v5 (Linux Administrator) — Question 71

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

Answer options

Correct answer: B

Explanation

The correct answer is B because when the command ls > files is executed and the file does not exist, the system creates the file and writes the output of ls into it. Options A, C, D, and E are incorrect because they misrepresent the behavior of the redirection operator '>' in this scenario.