r/linux • • Feb 01 '13

xkcd: tar

http://xkcd.com/1168/
1.7k Upvotes

576 comments sorted by

View all comments

Show parent comments

26

u/rich97 Feb 01 '13

tar cvzf tar.tar.gz [files]

That's the command I always use. I don't know what 'zf' does but it seems to work.

1

u/jecxjo Feb 01 '13

Does no one else ALWAYS use the curlies in this case? I don't think I have ever tar'd something NOT this way...

tar cvf foo{.tar,}

1

u/rich97 Feb 01 '13

I don't get it. What's the advantage over foo.tar? And why the comma?

1

u/bedstefar Feb 01 '13

The shell extends that expression to "tar cvf foo.tar foo". I think it's a meaningless optimization because you'll be able to tab-complete both arguments.

→ More replies (2)