Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Might be a stupid question, but what would be the worst for your system ? (I think both) But to my opinion mv would be the fastest to "delete" it all. Am I wrong ? (don't wana test aniway ^^ )

share|improve this question

migrated from Jul 1 '13 at 15:03

This question came from our site for professional and enthusiast programmers.

usually I do mkfs.ext3 /dev/sdx# would it be faster than rm/mv ? – Kent Jul 1 '13 at 14:01

2 Answers 2

I'd go with the first option because mv -r / /dev/null won't work:

$ mkdir A
$ mv -r A /dev/null 
mv: invalid option -- 'r'
Try 'mv --help' for more information.
$ mv A /dev/null 
mv: cannot overwrite non-directory ‘/dev/null’ with directory ‘A’

Not to mention that you can't move a directory like / into a subdirectory under itself.

If this is a serious question, why do you bother unlinking the data? For most purposes you can just recreate the file system.

share|improve this answer
even mv /tmp/xyz /dev/null gave me overwrite? warning; /tmp/xyz being a directory. – anishsane Jul 1 '13 at 14:59

dd is the command you need:

dd if=someisoyoudownloaded.iso of=/dev/sda

Then it is guaranteed unrecoverable overwritten. (Not military guaranteed, then use dban

/dev/null is not a regular file nor directory, it is a device you can redirect a datastream to it but not move another file or directory to it.

share|improve this answer
i hope the OP is asking for the best command to wreck a havoc on his system out of the two options he has. – Ashildr Oct 8 '13 at 14:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.