Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to discard the output of the ls command.
Linux CLI
ls > [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using /dev/zero or /dev/random which are for input, not discarding output.
Redirecting to /dev/stdout which shows output instead of hiding it.
✗ Incorrect
Redirecting output to
/dev/null discards it, so nothing is shown or saved.2fill in blank
mediumComplete the code to discard both standard output and standard error of the grep command.
Linux CLI
grep 'pattern' file.txt > [1] 2>&1
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Redirecting only standard output but not standard error.
Using files like /dev/zero which do not discard output.
✗ Incorrect
Redirecting both output and error to
/dev/null hides all messages from the command.3fill in blank
hardFix the error in the code to discard only the error messages of the cat command.
Linux CLI
cat missingfile.txt 2> [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Redirecting error to /dev/stdout which shows errors instead of hiding.
Using /dev/random or /dev/zero which are not for discarding output.
✗ Incorrect
Redirecting standard error (2>) to
/dev/null hides error messages while showing normal output.4fill in blank
hardFill both blanks to discard standard output and standard error of the find command.
Linux CLI
find /path -name '*.txt' > [1] 2> [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Redirecting one stream to /dev/null and the other to a wrong file.
Using /dev/stdout which shows output instead of hiding.
✗ Incorrect
Redirecting both standard output and error separately to
/dev/null discards all output.5fill in blank
hardFill both blanks to discard output and error of tar command and run it in background.
Linux CLI
tar -czf archive.tar.gz folder > [1] 2> [2] & disown
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Adding extra arguments to
disown which are not needed.Redirecting output incorrectly with extra symbols.
✗ Incorrect
Redirecting both outputs to
/dev/null hides all messages. The disown command detaches the job; no extra argument is needed.