0

What is the difference between the od, hd, hexdump and xxd commands ?

They are all commands for dumping files and they can all dump it in various formats such as hexadecimal, octal or binary. Why creating different programs ?

  • @jsotola od - dump files in octal and other formats. hexdump - ascii, decimal, hexadecimal, octal dump. hd - it's strange it doesn't seem to exist on the Linux man pages but I can find it on some website that list those pages and it seems to be an alias for hexdump. xxd - make a hexdump or do the reverse, in comparison to the three others, it can do a reverse. They all have some specific features but overall they do the same main job. We can even have equivalents commands from one to another. I was just wondering why not improve a single one instead of creating multiple commands. – Nicryc Jan 16 at 3:07
  • It's a pity hexdump can't do reverse like xxd does – Osqui Feb 19 at 11:44
1

Unix, of which Linux is just one flavour, has a long and rich history. It has not been developed by a single company or group, nor following a master plan, and has evolved by adaption to many niches. You can find many examples where multiple tools cover similar or the same functionality. They have been implemented by different people at different times for similar purposes; check their manpages for hints.

Thanks to the rise of Open Source in general, and the possibilities of the information age, we can enjoy the benefit of many of these tools being generally available to our use. The attempt to merge them into one will result in one more being available.

xkcd: Standards

Enjoy; these are amazing times!

A selection for further reading:

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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