1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/mkfifo.md
Lena d74e776a9c
pages.*/*: replace {{" "}} with "{{ }}" (#15034)
The latter notation is preferred by the style guide.
2024-12-05 22:57:27 +05:30

457 B

mkfifo

Make FIFOs (named pipes). More information: https://www.gnu.org/software/coreutils/mkfifo.

  • Create a named pipe at a given path:

mkfifo {{path/to/pipe}}

  • Send data through a named pipe and send the command to the background:

echo "{{Hello World}}" > {{path/to/pipe}} &

  • Receive data through a named pipe:

cat {{path/to/pipe}}

  • Share your terminal session in real-time:

mkfifo {{path/to/pipe}}; script -f {{path/to/pipe}}