[vox-tech] Ubuntu 10.04 LTS upgrade woes

Bill Broadley bill at broadley.org
Tue Jan 18 18:07:34 PST 2011


On 01/18/2011 03:43 PM, Brian Lavender wrote:
> tar cf dotfiles.tar .[!.]* || exit 2

I agreed with most of Brian's post, but the above seems unnecessarily complex 
and useless.  My best guess is that someone is paranoid, doesn't understand 
that ".." is a special case, or maybe it's portable to some broken version of 
tar like solaris's.

To demonstrate:
bill at kona:~/tmp/t2$ tar cvzf ../t1.tar .[!.]*
.bar
.blarg
.foo
.zoop/
bill at kona:~/tmp/t2$ tar cvzf ../t2.tar .
./
./.foo
./.bar
./.blarg
./.zoop/
bill at kona:~/tmp/t2$

No protecting against ".." necessary.  Nor would ~/..foo be accidentally
excluded (unlikely but legal).  Nor am I sure what || exit 2 is supposed to 
do.  Well I know about return values... but why?

Does anyone know of a Linux tar that doesn't behave like the above?

Sure I might be more paranoid with rm -r .* (which is similarly protected). 
Certainly people are free to make their own choices, I just wanted to point 
out that the extra complexity doesn't seem to do anything useful... at least 
under linux.



More information about the vox-tech mailing list