I/O Flashcards
(8 cards)
How to redirect standard error?
sth 2> target
What are 0>, 1>, 2> operators?
They redirect standard input, output and error respectively.
Alias for 1> is >
How to redirect something to standard stream?
sth >&1 redirects sth to standard output by file descriptor reference(1)
How to redirect both standard output and error?
sth &> target
How to ignore error output of command?
command 2> /dev/null
What does “cat” command do?
Read and concatenate file(s) and redirect to so
What is the difference between > and | operator for redirecting output?
> operator redirects to file
| operator redirects to another command input
What does “tee” command do?
Redirect received input to file and pass it also to standard output to proceed in pipeline