Term
What three files are automatically opened by the kernel for every command for the command to read input from and send its output and error messages to. |
|
Definition
These files are known as standard input (stdin), standard output(stdout), and standard error(stderr). |
|
|
Term
The input, output, and errors of a command can be redirected to other files by using these facilities in UNIX. |
|
Definition
file redirection facilities |
|
|
Term
Input to 'command' comes from 'input-file' instead of from the keyboard |
|
Definition
|
|
Term
Send output of 'command' tot he file 'output-file' instead of tot he monitor screen |
|
Definition
|
|
Term
Input to 'command' comes from 'input-file' instead of the keyboard, and the output of 'command' goes to 'output-file' instead of the display screen |
|
Definition
command< input-file > output-file |
|
|
Term
Give the file descriptors for standard input, standard output, and standard error. |
|
Definition
|
|
Term
Error messages generated by 'command' and sent to stderr are redirected to 'error-file' |
|
Definition
command 2>error-file if error-file exists it is overwritten, otherwise it is created |
|
|
Term
redirect stdout and stderr in one command |
|
Definition
cat lab1 lab2 1> cat.output 2>&1 |
|
|
Term
redirect stdin, stout, and stderr in one command |
|
Definition
command 1> output-file 0error-file |
|
|
Term
sort lines in a file called students and store the sorted file in students.sorted |
|
Definition
sort 0< students 1> students.sorted 2>sort.error |
|
|
Term
Write a command that counts the number of characters, words, and lines in a file called 'memo' in your pwd and writes these values into a file 'memo.size'. If the command fails, the error message should to go to a file 'error.log'. Use i/o and error redirections. |
|
Definition
wc 0error.log 1> memo.size |
|
|
Term
Write a shell command to send the contents of a 'greetings' file to 'doe@domain.com' by using the mail command. If the mail command fails, the error message should go to a file 'mail.errors'. use input and error redirection |
|
Definition
mail doe@daomin.com 2>mail.errors |
|
|