O
O
oni__ino2016-08-05 14:54:52
linux
oni__ino, 2016-08-05 14:54:52

Why doesn't /dev/null work on CentOS?

Very strange question, never met a similar problem.
Initial data: CentOS release 6.8 (Final), LVM partitions are read/write
The command that I entered a thousand times suddenly did not work...

dd if=/dev/null of=testfile bs=100M count=10
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000283543 s, 0.0 kB/s

But filling with random data works
dd if=/dev/urandom of=testfile bs=100M count=1
1+0 records in
1+0 records out
104857600 bytes (105 MB) copied, 15.1175 s, 6.9 MB/s

Deleting and creating a new /dev/null did not help.
rm -f /dev/null; mknod -m 666 /dev/null c 1 3

I am surprised and dismayed!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2016-08-05
@oni__ino

dd if=/dev/null of=testfile bs=100M count=10

why try to read from /dev/null?
/dev/zero most likely

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question