Question
The output redirection can be used with any command. Try the following command which prints all the files in the /bin directory into the file
The output redirection can be used with any command. Try the following command which prints all the files in the /bin directory into the file output: ls la /bin > output
Q:What is output of the command?
The output redirection > creates a file if it doesnt exist, and over-writes its contents if the file exists. Try the following command which prints the lists of users into the output file you created earlier: who > output
Q:what is output of the command?
Use the cat command to display the contents of the output file.
Q:The previous contents have been over-written or not.
The output re-direction >> can be used to append contents to an existing file. Try this: date >> output.
Q:Where is the difference comparing to the previous contents of the output file?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started