The flashcards below were created by user
on FreezingBlue Flashcards.
The tee command redirects its input to one or more files and standard output.
Named pipes in UNIX are also known as FIFOs.
The ls ~ | wc –l command displays the number of files in your home directory
including all hidden files.
Standard file descriptors are 1 2 and 3 for standard input standard output and standard
Standard files in UNIX are by default attached to your terminal (keyboard and display screen) but they can be changed to other files by using I/O and error
When the rsh computer1 sort < datafile command is executed on computer2
The sort command executes on computer1
The sort command read input from datafile which resides on computer2
Output of the sort command is displayed on computer2's screen
The > operator can be used for input redirection and < for output redirection.
The grep "David" < people | sort | lpr –Php1 command
in the standard input and the people files in a sorted order containing the string
The cat 1> letter 2> save 0< memo command reads input from the memo file sends output to the letter file and any error messages to the save file.
The cat 0< memo 1> letter 2>&1 command reads input from the memo file sends output to the letter file and any error messages to the display screen.
The cat 0< memo 1> letter 2> save command reads input from the memo file sends output to the letter file and any error messages to the save file.
The cat 0< memo 2>&1 1> letter command reads input from the memo file sends output to the letter file and any error messages to the display screen.
You can use the mkfifo –m 600 ~/myfifo1 command to create the myfifo1 FIFO in your home directory with access permissions on it set to read and write for you and
users in your group and no permissions for other users.
The cat < /etc/passwd > newfile command can be used to copy data in the /etc/passwd file to newfile.
You can create a FIFO by using the
mknod system call or the C library call mkfifo
The ls –a ~ | tee ls.output | wc –l command displays names of all the files in your current directory and the total number of these files.
The grep "David" < people | sort | tee mydata | wc -l command
in the people file in a sorted order containing the string "David"
displays the number of such lines and sends error messages to the display screen
In the grep < output_file > input_file command
grep reads input from output_file
A UNIX pipe can be used to redirect standard output of a command to standard
input of another command.
The 2> operator can be used for error redirection in Bash.