I picked up another small console tool yesterday — hoz, a file splitter that hasn’t seen any work in a few years, but is still quite usable.
File splitters used to be must-have utilities for me. Nowadays I have to admit that — with the proliferation of high-speed Internet connections, gigabyte flash drives, large file hosting sites and even e-mail that accepts megabyte-size attachments — splitting things and copying them on to floppies to be reassembled on another computer. … Well, I’ll just say I haven’t done that in a while.
I can still see where it might be useful though, in the case of something like splitting an ISO for uploading, or a movie for e-mailing. Regardless of the use, it was interesting to tinker with this one and watch it work.
The last rendition was 1.65, which is unfortunately 5 years old and could still use a little polishing around the edges. The size option for kilobytes and megabytes, for example, didn’t seem to be working for me. I could ask hoz to split things into clumps of a particular size, but I had to convert the the size to bytes before it would work; my “M” and “K” tags were ignored. Probably it was my mistake, although I did look at the source code and see if I was doing it right. (It’s worth noting that there’s also an option for gigabytes in the code, but it’s been commented out.)
It would also be nice if hoz would prepend the numbering on split files with a zero-buffer, rather than just starting with “1”. Something like “iso.001”, “iso.002” and so forth sorts nicer in the
ls output; “iso.1” and so forth get thrown around in the list.
Those are minor points though, and neither impedes function. Much more important is that hoz gave me picture-perfect splitting and splicing: I checked the md5sum on a random ISO, split it into about 12 pieces, then reassembled it and got the same results both times. And that’s what’s key.
Apparently there’s a GUI version available in the source code, and judging by screenshots around the Web it’s fairly straightforward. From the console it’s quick and easy to handle, and does things right. If you need a quick file cutter and reassembler, whatever the reason, this one will do it.
I usually use split as a file cutter, it’s part of GNU’s core utilities and works well, including keeping a constant number of digits on the suffix.
As for joining, well, isn’t that what ‘cat’ is for?
‘cat PREFIX.* > joined’ does the trick, and passes the md5sum test too 🙂
I ran across GAFFitter awhile back, not the same thing but definitely fits a new niche based on some of the old problems of splitting. http://gaffitter.sourceforge.net/index.html
Very interesting tool that perhaps might find a place in your arsenal.
Pingback: Crux ports for conky-cli, fe, hoz, net-monitor and tnote « Motho ke motho ka botho