As far as I know, all (l)unix dd commands from at least sixth edition
unix forward accept the options if=, bs= and count=, so portability
across (l)unix systems shouldn't be a problem.  Not all (l)unix dd
commands have some of the newer options, such as iseek= and oseek=,
but the ones I have seen all take the same syntax.

An assumption behind the system v magic file is that almost all file
does is match byte strings or integers, usually at the start of the
file being examined (though that wasn't really true even on unix).
The plan 9 file command also uses more complex algorithms; it's not
all simple table-driven matching.  It understands unicode and utf.  It
may look at histograms of byte or word distributions.  It may look for
programming language keywords.  It understands a.out and elf headers.
It can recognise a tar header and distinguish posix from non-posix
headers.  It can recognise html, rfc-822 mail messages, unix-style
mailboxes, images, compressed files and encrypted ones, and more.  A
quick look suggests that under 15% of the lines in file.c are devoted
to table definitions.


Reply via email to