Home » LPI » 117-201 » SIMULATION
SIMULATION
In order to create a file called DirContents containing the contents of the /etc directory you would type _______.
Correct Answer: ls /etc > DirContents
Explanation/Reference:
Explanation: Mostly all commands send their output to the screen or take input from the keyboard, but in Linux it is possible to send output to a file or to read input from a file. For example, the ls command sends it’s output to screen; to send the output to a file, you can use the command ls > filename.
This will send the output of the ls command to filename.
In this question, the ls command lists the contents of the /etc directory and sends the list to a file named DirContents.
Reference: http://www.netti.hu/doc/LinuxShellScript/rpf.htm
Download Printable PDF. VALID exam to help you PASS.
|
|