too many words by laura lemay

tar'ed and feathered

I did a dumb thing this morning.

tar cvf reference.doc images questions.doc stuff.doc files.tar

What I was trying to do was create a tar file with my doc files and my images in it so I could scp it from my work computer to my home computer. The tar file was going to be called files.tar. But as any basic unix weenie will tell you, that’s not the right syntax. The tar file you’re creating is supposed to be the first filename in the list. In fact, what this syntax will do is open reference.doc for writing, deleting the existing contents, stick images questions and stuff into it, and then complain it can’t find files.tar. Reference.doc: gone. Poof.

Never mind that reference.doc was actually the really important file there and the one I had been working on for more than a week. And of course yesterday when I was at work I had been working on a new computer where I had not configured Word to create an automatic backup, nor is that computer backed up at night. Nor did I do what I have told a half dozen clients to do over the last few years — create a source code control system for your docs and use it. Well. Sux2bMe.

Fortunately I do have a copy here at home so I only lost a day’s work. Alas, it was a day of nitpicky changes across the whole document, the sort of thing I hate to do the first time let alone twice.

From Stupid Unix Mistakes done in previous years I have tcsh set to noclobber, and rm aliased to ‘mv !$ ~/trash/’ (well, its a script, but that’s the idea). Now I guess I need to do something about tar.

Grumble.