null 與 zero 分別

 

null 與 zero 分別

    /dev/null  # black hole, produces no output

    /dev/zero # produces a continuous stream of NULL (zero value) bytes.

Test

dd if=/dev/null of=file count=10

0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.0484e-05 s, 0.0 kB/s

dd if=/dev/zero of=file count=10

10+0 records in
10+0 records out
5120 bytes (5.1 kB) copied, 6.9952e-05 s, 73.2 MB/s

 

Creative Commons license icon Creative Commons license icon