Categories
Linux Mastering Development

Why does `dd` have `swab` functionality

The manpage for dd notes an option swab

swab   swap every pair of input bytes

Why?


Don’t ask me what I’m trying to do — I’m not doing anything in particular, I’m just scratching my head. If were going to offer swaps, why not do it for all word sizes? Not that I need that, but if we’re just swapping 2 neighboring bytes it must be tied to a specific hardware scenario. Why not document that in the manual or info?

Leave a Reply

Your email address will not be published. Required fields are marked *