Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My best useless use of dd was in the Ubuntu 16.04 days.

I was at a satellite office with all windows PCs for the day, so used a live disk to get a decent environment to get things done. Only problem was that the DVD drive kept spinning down and every time I did something that was not cached it made me wait forever.

nohup + while loop + sleep 4s + raw dd read from CD for the win :)

EDIT: Reading this article it sounds like dd has no "special" ability to access the disk in a raw way. But surely that's what the nocache option is for...



I’ve only used dd once in my life (not much of a hacker!) but it was mostly useless.

Dropbox had some promotion for their new photo storage service, where they were giving away free extra space up to 10gb to encourage you to store your photos.

Some clever cookie told me you could make 10gb of ‘empty’ jpeg files and put them in your Dropbox folder.

The Dropbox app would compress this 10gb of files for upload (usual behaviour for the app in those days) and increase your storage permanently for free.

I can’t remember the command but it was something like

dd if=/dev/zero of=/path/to/dropbox/1.jpg bs=10000000

Bam! 1 10gb jpeg file full of zeros that compress down to a few bytes. Instant 10gb free. Now uploading required!

I think I still have that dropbox account, I learnt about dd and dev/{null,zero,one} that day and never used them again.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: