TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

dd – Destroyer of Disks (2008)

82 pointsby opensourcedudeover 9 years ago

12 comments

DanBCover 9 years ago
About drive wiping: You&#x27;re probably better off using the ATA Secure Erase command, which is very quick and does the entire disc. dd and other tools risk not doing blocks marked as bad, for example.<p>He&#x27;s right that a single overwrite of zero is probably good enough to make sure that data is gone, but it&#x27;s probably not enough to persuade other people that it&#x27;s gone. A few passes of pseudo random data is probably better if you need to persuade other people that the data has gone.<p>But if it&#x27;s really important drive wiping is what you do to protect the drives until you get a change to grind them.
评论 #10656638 未加载
评论 #10656496 未加载
评论 #10656747 未加载
评论 #10657074 未加载
评论 #10656670 未加载
ameliusover 9 years ago
&gt; Unfortunately, there is no command-line option to have `dd` print progress<p>How difficult could it be to write a dd command from scratch that does include progress-reporting? I mean, dd is simply reading blocks of data from one file descriptor and writing them to another.
评论 #10655751 未加载
评论 #10656665 未加载
评论 #10655830 未加载
评论 #10656992 未加载
评论 #10657455 未加载
评论 #10655788 未加载
评论 #10658591 未加载
vogover 9 years ago
Does the third command really work as intended?<p><pre><code> sudo cat ubuntu-14.04-desktop-amd64.dmg &gt;&gt; &#x2F;dev&#x2F;sda1 </code></pre> I believe this will attempt to write data after the of the the block device, which almost by defintion will fail.<p>However, I often do the following, which works pretty well:<p><pre><code> sudo cat ubuntu-14.04-desktop-amd64.dmg &gt; &#x2F;dev&#x2F;sda1</code></pre>
评论 #10655067 未加载
评论 #10655059 未加载
评论 #10655200 未加载
评论 #10655391 未加载
nailerover 9 years ago
It&#x27;s actually &#x27;copy and convert&#x27; but &#x27;cc&#x27; was taken.
rsyncover 9 years ago
You can &#x27;dd&#x27; from Unix to the cloud ... well, some clouds ...<p><pre><code> pg_dump -U postgres db | ssh user@rsync.net &quot;dd of=db_dump&quot; mysqldump -u mysql db | ssh user@rsync.net &quot;dd of=db_dump&quot; </code></pre> ... although these days, now that we support attic and borg[1], nobody does things like this anymore.<p>[1] <a href="http:&#x2F;&#x2F;www.rsync.net&#x2F;products&#x2F;attic.html" rel="nofollow">http:&#x2F;&#x2F;www.rsync.net&#x2F;products&#x2F;attic.html</a>
评论 #10657987 未加载
SeldomSoupover 9 years ago
&gt; If you want to erase a drive fast then use the following command (where sdXXX is the device to erase):<p><pre><code> dd if=&#x2F;dev&#x2F;zero of=&#x2F;dev&#x2F;sdXXX bs=1048576 </code></pre> Question: is there a disadvantage to using a higher blocksize? Is the read&#x2F;write speed of the device the only real limit?
评论 #10658041 未加载
rdc12over 9 years ago
It is worth noteting that the shred program mentioned is more or less useless on modern filesystems for a variety of reasons, the man-page has a list that it will fail to work correctly on (btrfs, ext3, NFS).<p>It may well be that the only usable filesystem for it, is FAT32 (and possibly NTFS, not sure on that thou).
esaymover 9 years ago
This usually messes stuff up pretty good:<p><pre><code> perl -e &#x27;$file = &#x27;&#x2F;dev&#x2F;sda&#x27;;\ $s = -s $file;\ $i = $s&#x2F;2;\ while(--$i &gt; 0){\ $r = int rand($s);\ system(&quot;dd if=&#x2F;dev&#x2F;urandom of=$file skip=$r count=1&quot;);\ }&#x27;</code></pre>
cmurfover 9 years ago
The &quot;Unable to install GRUB&quot; recommended fix to remove the GPT is wrong. The proper thing to do is create a 1MiB partition, BIOSBoot partition type (gdisk internal code 0xEF02), and then grub-install will find it and install core.img there automatically.
x0over 9 years ago
I prefer `pv` (pipe viewer) for watching dd&#x27;s progress<p><a href="http:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;pv" rel="nofollow">http:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;pv</a>
评论 #10658249 未加载
shin_laoover 9 years ago
The point of using random instead of zero is that it&#x27;s harder to see which parts have been overwritten and which parts haven&#x27;t been.
评论 #10656008 未加载
评论 #10655621 未加载
评论 #10655612 未加载
评论 #10655639 未加载
评论 #10655532 未加载
fiatjafover 9 years ago
I don&#x27;t believe this is the actual name. Are you serious?