Why to use named pipe?
1. No data is written on disk while reading and writing file
2. Screen sharing
3. Higher read write IO
Screen sharing with named pipe
- terminal-1
mkfifo /tmp/pipe1
- terminal-1
script -f /tmp/pipe1
- terminal-2
cat /tmp/pipe1
- terminal-1 start typing the command it will be shown in terminal-2