Dd Error entering command on device

I am new to storage trying to erase data in device '/dev/sdcd' , why should I get "No space"

 [root@ dev]# dd if=/dev/zero of=/dev/sdcd bs=4k dd: error writing '/dev/sdcd': No space left on device 1310721+0 records in 1310720+0 records out 5368709120 bytes (5.4 GB) copied, 19.7749 s, 271 MB/s [root@ dev]# ls -l /dev/null crw-rw-rw-. 1 root root 1, 3 Oct 27 01:35 /dev/null 

If this is a very simple question, I regret it

+8
linux redhat linux-device-driver
source share
1 answer

The device /dev/zero will continue to provide zeros for as long as you read from it, right up to the heat of death of the Universe, if your equipment lasts so long.

With your command, you have no limit, for example count= , so it will continue to read from /dev/zero and write until /dev/sdcd until the last one is over.

It will still write to the device, so that you can safely ignore the error at the end (although it might be a good idea to ensure that the disk is actually an integer multiple of the block size to avoid the possibility of leaving sensitive information at the end).

+9
source share

All Articles