Why is dd so slow with a bs of 100M

I just tried to overwrite a fast ssd using dd. Using the ubuntu boot image I typed in: dd if=/dev/zero of=/dev/sda bs=100M error writing '/dev/sda': No space left on device blah blah 256 GB copied, 1195.81 s 214 MB/s Isn’t that quite slow? And where is the bottleneck? What about the choice of block size? … Read more

How can I monitor disk I/O in a particular directory?

I’ve got a few processes with a known name that all write to files in a single directory. I’d like to log the number of disk block reads and writes over a period (not just file access) to test whether a parameter change reduces the amount of I/O significantly. I’m currently using iostat -d -p, but that is limited to the whole partition.

Why cat, grep and other commands can’t understand files starting with minus sign?

If I have a file which name starting with single or several minus sign, for example –1 it can’t be used as a parameter of many commands. Even if I run cat –1 instead of file content I get unrecognised option error message: cat: unrecognized option '–1' Same effect appears when I type cat "–1" … Read more