"cat / dev / random" compared to "tail -f / dev / random"

Statement

cat /dev/random

continues to produce output, as expected, but

tail -f /dev/random

freezes (at least on OSX and SUSE). Why is the last statement hanging?

+4
source share
1 answer

tail -f performs several actions:

  • Find the end of the stream, either by reading before reaching EOF, or by searching to the end (operation not available in /dev/random).
  • (, , , , N ) .
  • , , .

- /dev/random - .

cat , .

+8

All Articles