Command Data Flows & Redirecting Standard Error/Input Flashcards
1
Q
data stream number for standard error?
A
standard error = 2
2
Q
append multiple error messages into one text file named error.txt?
A
cat “error” 2» error.txt
3
Q
send error messages into one text file named error.txt?
A
cat “error” 2> error.txt
4
Q
Goal:
- Create 2 files Error.txt/output.txt
- have SDout go to output.txt
- have errors go to error.txt
1 CMD
A
cat 1> outout.txt 2> errors.txt
5
Q
how to use cat IOT read from input.txt
A
cat 0< filename.txt
6
Q
how to read standard output from a file
A
cat 0<
7
Q
how to read standard output from input.txt and redirect the data into a new file named hello.txt
A
cat 0
8
Q
how to append text from input.txt and into hello.txt.
A
cat 0>hello.txt
9
Q
how to redirect data from a file into a terminal window with the destination address of /dev/pts/0
A
cat 0< “data” >/dev/pts/0