Chapter 10 Flashcards
Which standard file attach with keyboard and which one attach with screen
input standard with keyboard
output standard and error standard with screen
Where pipe size is stored
Header file
What is input, output and error redirection
We can use the Linus redirection features to detach the default files from stdin, stdout and stderr and attach other files with them.
What ‘cat < phones’ command do
Search from phone file
How to create FIFO
‘make fifo’ command at command line
What is special file
A special file is used to represent device
What are 2 types of special files
- Block special files (for those devices whose IO are block e.g. disk)
- Character special files (for those devices whose IO are characters)
Does FIFO must be opened before communication unlike pipe
Yes
What is SIGPIPE signal
SIGPIPE signal is a result when we write to FIFO that no process has opened for reading. User will get a SIGPIPE signal/broken pipe message
Who sends EOF when multiple process write on FIFO
Kernel
What is atomic write
When multiple process writes on FIFO then kernel make sure that each process writes separately and there should not be intermixing
What are 2 common uses of FIFO
- Client server architecture
2. command line - pass data from one shell command to another pipeline without creating a temporary file.
What mknod system call do
Create special (device) file
What is batch job
Program runs at background
What wc command do
Display size of file