# Example showing the /boot partition. Note command is run as root. # cd /boot; dd if=/dev/zero of=ShredUnusedBlocks bs=512M; shred -vzu ShredUnusedBlocks dd: writing `ShredUnusedBlocks': No space left on device 1+0 records in 0+0 records out 231747584 bytes (232 MB) copied, 8.21679 s, 28.2 MB/s shred: ShredUnusedBlocks: pass 1/4 (random)... shred: ShredUnusedBlocks: pass 1/4 (random)...20MiB/222MiB 9% shred: ShredUnusedBlocks: pass 1/4 (random)...40MiB/222MiB 18% shred: ShredUnusedBlocks: pass 1/4 (random)...60MiB/222MiB 27% shred: ShredUnusedBlocks: pass 1/4 (random)...80MiB/222MiB 36% shred: ShredUnusedBlocks: pass 1/4 (random)...100MiB/222MiB 45% shred: ShredUnusedBlocks: pass 1/4 (random)...120MiB/222MiB 54% shred: ShredUnusedBlocks: pass 1/4 (random)...140MiB/222MiB 63% shred: ShredUnusedBlocks: pass 1/4 (random)...160MiB/222MiB 72% shred: ShredUnusedBlocks: pass 1/4 (random)...180MiB/222MiB 81% shred: ShredUnusedBlocks: pass 1/4 (random)...200MiB/222MiB 90% shred: ShredUnusedBlocks: pass 1/4 (random)...220MiB/222MiB 99% shred: ShredUnusedBlocks: pass 1/4 (random)...222MiB/222MiB 100% shred: ShredUnusedBlocks: pass 2/4 (random)... shred: ShredUnusedBlocks: pass 2/4 (random)...18MiB/222MiB 8% shred: ShredUnusedBlocks: pass 2/4 (random)...39MiB/222MiB 17% shred: ShredUnusedBlocks: pass 2/4 (random)...59MiB/222MiB 26% shred: ShredUnusedBlocks: pass 2/4 (random)...79MiB/222MiB 35% shred: ShredUnusedBlocks: pass 2/4 (random)...98MiB/222MiB 44% shred: ShredUnusedBlocks: pass 2/4 (random)...118MiB/222MiB 53% shred: ShredUnusedBlocks: pass 2/4 (random)...139MiB/222MiB 62% shred: ShredUnusedBlocks: pass 2/4 (random)...158MiB/222MiB 71% shred: ShredUnusedBlocks: pass 2/4 (random)...179MiB/222MiB 81% shred: ShredUnusedBlocks: pass 2/4 (random)...199MiB/222MiB 90% shred: ShredUnusedBlocks: pass 2/4 (random)...219MiB/222MiB 99% shred: ShredUnusedBlocks: pass 2/4 (random)...222MiB/222MiB 100% shred: ShredUnusedBlocks: pass 3/4 (random)... shred: ShredUnusedBlocks: pass 3/4 (random)...17MiB/222MiB 8% shred: ShredUnusedBlocks: pass 3/4 (random)...38MiB/222MiB 17% shred: ShredUnusedBlocks: pass 3/4 (random)...58MiB/222MiB 26% shred: ShredUnusedBlocks: pass 3/4 (random)...78MiB/222MiB 35% shred: ShredUnusedBlocks: pass 3/4 (random)...97MiB/222MiB 44% shred: ShredUnusedBlocks: pass 3/4 (random)...117MiB/222MiB 53% shred: ShredUnusedBlocks: pass 3/4 (random)...137MiB/222MiB 62% shred: ShredUnusedBlocks: pass 3/4 (random)...157MiB/222MiB 71% shred: ShredUnusedBlocks: pass 3/4 (random)...177MiB/222MiB 80% shred: ShredUnusedBlocks: pass 3/4 (random)...197MiB/222MiB 89% shred: ShredUnusedBlocks: pass 3/4 (random)...217MiB/222MiB 98% shred: ShredUnusedBlocks: pass 3/4 (random)...222MiB/222MiB 100% shred: ShredUnusedBlocks: pass 4/4 (000000)... shred: ShredUnusedBlocks: removing shred: ShredUnusedBlocks: renamed to 00000000000000000 shred: 00000000000000000: renamed to 0000000000000000 shred: 0000000000000000: renamed to 000000000000000 shred: 000000000000000: renamed to 00000000000000 shred: 00000000000000: renamed to 0000000000000 shred: 0000000000000: renamed to 000000000000 shred: 000000000000: renamed to 00000000000 shred: 00000000000: renamed to 0000000000 shred: 0000000000: renamed to 000000000 shred: 000000000: renamed to 00000000 shred: 00000000: renamed to 0000000 shred: 0000000: renamed to 000000 shred: 000000: renamed to 00000 shred: 00000: renamed to 0000 shred: 0000: renamed to 000 shred: 000: renamed to 00 shred: 00: renamed to 0 shred: ShredUnusedBlocks: removed
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: