When is a text file not a text file? When it’s a tar file that’s overwritten the original text file, because someone forgot to specify the archive name with the -f option.
When is a tar file not a tar file? When someone treats the tar file like a text file, adding and removing text to and from it.
These are the problems that I had to resolve last week, driving me mad at every turn. I now, however, know the tar archive format like the back of my hand.
To try and even begin to understand what a pain this was, think of the scene in National Lampoon’s Christmas Vacation. The one where Clark Griswald hands his son a hugely entangled ball of Christmas lights and ask him to untangle it. Although we don’t see Rusty untangle the lights, it’s obvious that his experience would be a living hell. If it wasn’t then you wouldn’t find the scene funny. My scene, however, was not funny because, although like Rusty I had to tackle a living nightmare, my scene was reality. My reality. And I believed the contents of those mangled tar files to be a lot more important than Christmas decorations.
Believed. Yes, I’ll say it again. Believed. Because after all my hard fought un-mangling, after days of writing and re-writing Perl scripts, what was I to discover? That what was in this mangled pile of crap was just stuff that either I already had or stuff that I didn’t need. Brilliant!
So, did I gain anything, anything at all from this? Well I know how tar files are laid out. I know how to fix them. And I have few scripts to do all this. Scripts that got so incredibly complicated, yet ended up so simple once I understood the extent and detail of the corruption.
I do look back and think “I think I actually enjoyed some of that” (except for the dreams, of course. The horrible dreams of 512 byte block alignment). But, yes, overall I gained something. And, no doubt, I’ll need to call on this knowledge again. But one thing I’d like to say is this, “don’t forget how -f works or you’ll be untangling Christmas lights until after Easter”.
-
Recent Posts
Recent Comments
Archives
Categories
Meta