Peng Yu wrote: > It seems that both `mkfifo` and `mknod ... p` can create a fifo. What > is the difference between them? Thanks.
The mknod utility existed "for a decade" in Unix (don't quote me on that vague time statement) before mkfifo existed. The mknod utility existed in Unix v7 as a thin wrapper around the mknod(2) system call. man 2 mknod https://pubs.opengroup.org/onlinepubs/9699919799/functions/mknod.html Named pipes are special files and special files are created with mknod. At least that was true until mkfifo came along. mkfifo was standardized by POSIX while the mknod utility seems too OS specific and never made it into the standards as far as I know. Therefore "mkfifo" should be used for standards compliance and "mknod" should continue to exist for backwards compatibility. Bob