gabriel rosenkoetter on Mon, 4 Nov 2002 17:46:06 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] split & cat


On Mon, Nov 04, 2002 at 03:53:00PM -0500, Walt Mankowski wrote:
> split(1) (at least GNU's version) works just fine with binary files.

But (and I think we've had this generic argument before),
Sun's/SGI's/whatever's may not. So it's a bad idea to get in the
habit. And dd(1) is more versatile anyway.

What's more, split(1), by default, divides a file into files of "1000
lines", and doesn't have a good way to specify a byte boundary,
which is what you really want to specify. (A binary file may simply
not contain a ^J or a ^M anywhere.) GNU's -b flag sort of lets you
do this, but it may make reconsruction later complicated. (Was there
a CR? Was there an LF? Were there both? Neither? Did split(1)
swallow them?)

dd(1) is the Right tool for breaking up files along byte (or disk
block, or whatever arbitrary size larger than a byte you like)
boundaries.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgppfquRilnOc.pgp
Description: PGP signature