Changes

Jump to: navigation, search

Tutorial5: Redirection

6 bytes added, 13:44, 31 August 2020
LINUX PRACTICE QUESTIONS
# Write a single Linux command to provide a detailed listing of all files in the '''/bin''' directory, sending the output to a file called listing.txt in the “'''projects'''” directory (append output to existing file and use a relative pathname)
# Write a single Linux command to redirect the stderr from the command:<br>'''cat a.txt b.txt c.txt''' to a file called '''error.txt''' contained in the “'''assignments'''” directory. (overwrite previous file’s contents and use only relative pathnames)
# Write a single Linux command: '''cat ~/a.txt ~/b.txt ~/c.txt''' and redirect stdout to a file called “good.txt” to the “tests” directory and stderr to a file called “bad“'''bad.txt” txt'''” to the “'''tests'''” directory. (overwrite previous contents for both files and use only relative-to-home pathnames).
# Write a single Linux command to redirect the stdout from the command:<br>'''cat a.txt b.txt c.txt''' to a file called wrong.txt contained in the “'''projects'''” directory and throw-out any standard error messages so they don’t appear on the screen (append output to existing file and use only relative pathnames).<br><br>
# Write a single Linux '''pipeline command''' to display a detailed listing of the '''projects''' directory but pause one screen at a time to view and navigate through all of the directory contents. Use a relative-to-home pathname.
13,420
edits

Navigation menu