tar --help
cross fingers
tar --hep
Fuck.
It should be a crime to directly link XKCDs images without the corresponding page.
I understand and sympathize with Rob on a spiritual level.
I remember it like this:
tar -extract ze file
and
tar -compress ze fileAnd also tar -the fuck is in this file
z is for gz files only though, there are plenty of others. xf autodetects and works with all of them (with GNU tar att least).
I hope whoever thought
-l
should mean “check links” instead of list has a special place in Hell set aside for them.I have no idea what
print a message if not all links are dumped
even means.Was gonna say this. Why TF is list not -l as…everywhere else?
No no it’s this:
-
Decide you’ve gotta use tar.
-
man tar
-
Guess-and-check the flags until it seems to work.
-
Immediately forget the flags.
That was my case until I discovered that GNU tar has got a pretty decent online manual - it’s way better written than the manpage. I rarely forget the options nowadays even though I dont’ use
tar
that frequently.
-
Those are straightforward; it’s the remaining 900 options that are confusing. I always need to look up
--exclude
s and always get--directory
wrong, somehow.You also don’t need the dash for the short options.
Also, if you’re compressing with bzip2 and have archives bigger than a few megabytes I’ll like you a lot more if you do it with --use-compress-prog=pbzip2
You also don’t need the dash for the short options.
True, but I refuse to entertain such a non-standard option format. It’s already enough to tolerate
find
’s.Technically the notation with dashes is the non-standard one - the dash form is a GNU addition. A traditional tar on something like Solaris or HP-UX will throw an error if you try the dash notation.
It’s also traditional to eat raw meat, but we discovered fire at some point.
Don’t try to take my raw ground pork away from me.
I got toxoplasmosis that way
my raw ground pork away from me.
Who are you, the Mett demon?
\(It works great with beef, too. Bonus points for the raw yolk over it. If not homemade though there’s literally one bar that I trust with this, salmonella is not fun.)
That’s an audible “yuck” from me, man. Well done!
Looks like you Mett your match.
Can’t be well done if it’s raw.
You also don’t need the dash for the short options.
You know when you meet someone and you’re just like “oh boy, yeah, they’re evil. No humanity at all”
ps aux says hi!
I think the
-j
also compresses with bzip2 but I’m not sure if this is defined behavior or just a shortcutYes, but I’m asking you to use pbzip. bzip at best utilizes one core, both for packing and unpacking. pbzip uses as many cores as IO bandwith allows - with standard SATA SSDs that’s typically around 30.
pbzip can only utilize multiple cores if the archive was created with it as well.
Does something similar happen using
xz
?I’ve searched for it and xz also doesn’t use multithreading by default, you can change the program tar uses to compress by passing the
-I
option. For xz using all possible CPU threads:tar -cv -I 'xz -6 -T0' -f archive.tar.xz [list of directories]
The number indicates the compression ratio, the higher the number, the more compressed the archive will be but it will cost more in terms of memory and processing time
I don’t think tar is actually hard, we are just in the time where we externalize more information into resources such as Google. Its the same reason why younger people don’t remember routes by name or cardinal direction as much anymore.
side note: $ tldr is much better than man for just getting common stuff done.
Yes, but still tar options are kinda janky.
I always just use
“eXtract Zee Files”
deleted by creator
As a mnemonic I usually read the “f” as “fucking”:
tar
,c
ompressf
uckingpics.tar.gz
with junk from./pics
tar
, ex
tractf
uckingpics.tar.gz
That’s only for scripting though. Most of the time I simply right-click the directory or archive, and let Engrampa deal with it.
Simple:
tar -(whatever options you want here, my go to is xvzf or cvzf) archive-name.tar file/folder-to-compress
Create ze vuking file
Xtraxt ze vuking file
oh my god, thank you for this
tar can do things other than this?
Oh I’m aware, I’m just saying this is what I normally do with it
I’m sorry, I was trying to be silly and poke fun at how most of us just use the one or two tar commands and it totally didn’t translate in text like it did my head. Have a wonderful day good internet stranger.
Thank you, I still don’t understand.
Just add -a for auto compression.
tar xafv
every time, works like a charm.Do you know if it recognize tgz extension?
I use Linux for years and still Google every time I have to use it!
Why?
I didn’t know about auto-compress, thanks!
i leave off the dash ;)