77 Comments
- inactive, on 10/12/2007, -19/+98DD, the most amazing boob size ever.
- kremvax, on 10/12/2007, -2/+60dd is useful, but "most useful?" I don't think I trot it out once a month.
For my money, I'd have to say grep is the single most useful command. - noodlez, on 10/12/2007, -4/+28most useful?
man - salinemist, on 10/12/2007, -1/+17Be gentle and give the folks who don't glow from hours in front of a 9600 baud dumb terminal a chance.
- subgeniusd, on 10/12/2007, -7/+19That's actually cup size but who cares. This is a very interesting tutorial. Not for the brand new user though.
- Bean945, on 10/12/2007, -4/+15Before i click on the article there better be more than 1 gazillion uses as stated...
- 1ivewire, on 10/12/2007, -0/+11Wanna dual boot Linux on a windows machine without changing your MBR? dd is your friend.
dd if=/dev/(linux boot partition) of=/(path to removable media file) bs=512 count=1
copy this file to your windows partition and add a reference to it in your C:boot.ini. Now reboot and use the Windows boot loader to switch to Linux. - KrashTheMighty, on 10/12/2007, -0/+9I could have sworn grep was the most useful
- t1m1, on 10/12/2007, -1/+9Yeah... already used it a couple of times...
But what does dd have to do with Linux? I thought it existed in every POSIX operating system... - inactive, on 10/12/2007, -1/+8yeah....
People misuse the term "Linux" pretty regularly. I think it's something we're just going to have to deal with; when somebody says now "Linux" they almost always mean "POSIX compliant operating system (*NIXen, BSDs, etc.) or a derivative; excepting MacOS". I used to try and correct people and try to use "GNU/Linux" or "*nix OS" or the distro name appropriately, but people just get confused... - jamend, on 10/12/2007, -1/+8Or just use dd for Windows?
http://www.chrysocome.net/dd - joelito, on 10/12/2007, -0/+6Where have you been programming? Visual Studio?
- codemonkey2841, on 10/12/2007, -2/+7@kremvax
I'm right there with you man - Markie1006, on 10/12/2007, -0/+5Perfect tool if you need to convert ascii to ebcdic.
(is my age showing?) - inactive, on 10/12/2007, -0/+5hmmm....
I bet you remember punch cards too....
:o) - Markie1006, on 10/12/2007, -0/+5One of my very first unix jobs was helping to migrate off their mainframes onto this newfangled Unix box tucked into the corner of the datacenter, dwarfed by the two S-3090's and their associated disk banks.
I was fairly new to unix, and not knowing any better, spent 3 days writing a ascii to ebcdic converter in C - then I found I could do the exact same thing with dd.
You could have heard my head hit the keyboard from 500 yards. - buZztiaan, on 10/12/2007, -1/+6dd is actually a GNU tool , not a Linux tool
- nofxjunkee, on 10/12/2007, -0/+5It happens with OS X all the time as well. see the recent submission about a hidden Lord of the Rings *feature* ... which was a calendar history file from BSD.
- diggapleaze, on 10/12/2007, -0/+4call me a tired hack but I think ls and cat are the most useful. Where would you be without them?
- zobetron, on 10/12/2007, -3/+7no, don't try it. unless you want to wipe your entire root file system...
- timvb, on 10/12/2007, -0/+3Everyone: I was half-asleep at the time. You are right, it is for POSIX-compliant operating systems, and there is not a gazillion uses. However, please realize that I was not being so literal.
- Gryffydd, on 10/12/2007, -7/+10@noodlez
Yah, but man is pretty dangerous. typing 'man woman' can bring your whole system down I've heard. - fani, on 10/12/2007, -0/+3dd if=/proc/ksyms | hexdump -C | less ?
Eh ? What a fool. Just cat /proc/ksyms.
Why mess with dd when you don't need to ? and why do a hexdump for something thats already in ascii ?
Some good but some bad in the tutorial - wisam, on 10/12/2007, -2/+5The funny thing is that you probably need to buy some backup software on MS Windows to do the same tasks that a simple command on Unix can do.
- Rexxy, on 10/12/2007, -1/+4yes useful, but also dd can be more dangerous than you think ;-)
- Markie1006, on 10/12/2007, -0/+3yea - as opposed to the Solaris dd, AIX dd, HP/UX dd, BSD dd
- sleepless, on 10/12/2007, -0/+3dd if=/dev/sda2 bs=16065 | hexdump -C | grep 'I really don't love him anymore.'
That is my favorite command :-) - dollyknot, on 10/12/2007, -0/+3I find the most useful command to be su, followed by konqueror, because it enables me to check and change permissions, do symbolic links all without having to remember arcane switches to commands like chmod and I cannot even remember the command to do a symbolic link.
- arizonagroove, on 10/12/2007, -1/+4From the article
--------------------------------
How many seconds has the system been up:
$ dd if=/proc/uptime | hexdump -C | less
--------------------------------
Huh? What possible use does that have? If I run that I get this:
0+1 records in
0+1 records out
16 bytes (16 B) copied, 7.2e-05 seconds, 222 kB/s
00000000 32 37 34 35 2e 32 34 20 32 33 39 39 2e 34 33 0a |2745.24 2399.43.|
00000010
That's sod all use. If I want to know how long the system has been up I can just do
$ update
Which gives me:
19:44:12 up 46 min, 1 user, load average: 0.07, 0.12, 0.14
The command given for Memory stats produces useless output as well. - dhughes, on 10/12/2007, -0/+3@ Gryffydd
You think that's bad? Try "man mount" ! (no offence but... *shudder*) - donlaverty, on 10/12/2007, -0/+3well, he should not read from /dev/null if he wants anything written to his floppy disk
if he wants to zero it he has to read from /dev/zero - JeremyTTU, on 10/12/2007, -2/+4If you want to do a simple drive copy...
cat /dev/sda > /dev/sdb
or
cat /dev/hda > /dev/hdb
Much faster as dd does it in blocks and cat is a direct stream... - MrSunshine, on 10/12/2007, -0/+2Dupe? I have a story about this command as my #1 Digg.
- rperow, on 10/12/2007, -1/+3I'm not sure I'd call it the "most" useful.. handy, perhaps?
i'm a huge fan of grep. especially if you pass --colour=auto and color highlight exactly the string you're grepping for. - nofxjunkee, on 10/12/2007, -0/+2kremvax: you can easily emulate grep with perl, python, or ruby. now regexes themselves are something that could be considered the most useful tool.
I think that the shell is the single most useful program on *nix. without it we wouldn't have the unix philosophy (do only one thing and do it well). for me zsh takes the cake. - nofxjunkee, on 10/12/2007, -0/+2You can disagree till you're blue in the face, but the definition of an OS will not change and it still remains that Linux is the kernel (OS), and KDE is a Desktop Environment that runs on Linux among other operating systems. If you use KDE on FreeBSD you are NOT using Linux. That's all.
- sn0w, on 10/12/2007, -0/+2True; it's a part of the GNU coreutils (there's also a similar Unix program, upon which the GNU implementation is based). Calling it a 'Linux command' is inaccurate. I for one don't blame the GNU project for pushing the GNU+Linux terminology. Linux (which is a kernel, and nothing else) is useless without the GNU tools.
- Namco, on 10/12/2007, -0/+2Used it many a time to upgrade my tivo disks without knowing what it really does. Great article!
- Yoshi39, on 10/12/2007, -0/+2Don't you mean uptime and not update
- inactive, on 10/12/2007, -0/+1# dd if=/dev/zero of=/dev/hda
or better
# dd if=/george/bush/brain of=/tmp/*****.log bs=16
1+1 records in
1+1 records out - inactive, on 10/12/2007, -0/+1Myself, I thought UNIX pipes and filters where the most useful.
- pixelbeat_, on 10/12/2007, -0/+1There are a lot of fundamental posix syscalls encapsulated in dd.
Here's a script to truncate a file using dd, for example:
http://www.pixelbeat.org/scripts/truncate - fanboydcs, on 10/12/2007, -0/+1dd is very useful, I really like dd_rescue and ddrescue, yes very similar programs but they both have their usefulness... No more dd if=/target of=/wherever.iso conv=noerror,sync
- eosp, on 10/12/2007, -0/+1Makes a faster copy for real files too.
- dougmc, on 10/12/2007, -0/+1Most useful? Nah.
Most under-appreciated? Closer, but I'd give xargs that title ... - barbobot, on 10/12/2007, -1/+2At least you could use the dd command for destruction instead of doing the same old ass rm -rf joke
dd if=/dev/urandom of=/dev/hda1 - shucklak, on 10/12/2007, -0/+1Agreed. grep is more useful and just as if not more powerful than dd.
dd is nice with great functionality, but not the most useful command - vuke69, on 10/12/2007, -0/+1There are many valid reasons for copying file systems as shown on that page.
And if that is the actual need, copying the complete file system, then dd is probably the best way to do it.
Now if the actual need is only to copy all the files on the file system (and there are no serious errors in the aforementioned filesystem, and/or drive itself) then please, don't use dd. - Markie1006, on 10/12/2007, -0/+1> rm -r / does very little as a user, save maybe remove /home/`whoami`/.
In a well setup system, run by competent admins, you should be able to create a dummy user, and give it a try.
I doubt many systems are setup well enough that to give it a try, but they should be. - rmxz, on 10/12/2007, -0/+1Inded "cat" or "cp" are better for many of the things that "dd" is often used for.
As a historical note, if you're using some really old Unix (early 90s, IIRC) "cp" had some problems on block devices that would only read or write (if my recollections are right, the problem was writing; but beowulf.org's mailinglists [1] suggest the problem was reading) whole blocks at a time. Since then, though, yes, "cp" and "cat" make more sense. Especially for TFA's silly examples of reading stuff in /proc that never ever had problems with being read directly.
http://www.beowulf.org/archive/2001-June/004029.html -
Show 51 - 77 of 77 discussions



What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the