/dev/null を読むと常に end of file が返され (つまり、 read(2) は 0 を返す)、対照的 に /dev/zero を読むと常にバイト数 0 ('\0' 文字) が返される。
これらのデバイスは通常次のように作られる:
mknod -m 666 /dev/null c 1 3 mknod -m 666 /dev/zero c 1 5 chown root:root /dev/null /dev/zero
Since Linux 2.6.31, reads from /dev/zero are interruptible by signals. (This change was made to help with bad latencies for large reads from /dev/zero.)
[man1]
[man2]
[man3]
[man4]
[man5]
[man6]
[man7]
[man8]
[a]
[b]
[c]
[d]
[e]
[f]
[g]
[h]
[i]
[j]
[k]
[l]
[m]
[n]
[o]
[p]
[q]
[r]
[s]
[t]
[u]
[v]
[w]
[x]
[y]
[z]