DEV Community

Discussion on: What do you Google EVERY. SINGLE. TIME. and never just memorize?

Collapse
 
aminarria profile image
Amin Arria •

How to make a tar file...

Collapse
 
tbodt profile image
tbodt • • Edited

xkcd tar

Collapse
 
baamenabar profile image
B. Agustín Amenábar Larraín •

I threw this one at a dev I used to work with. He answered instantly, he could have disarmed 2 bombs with that speed.

Instant respect gained

Collapse
 
sanjay555 profile image
Sanjayshr • • Edited

I figured out how to remember it. To create tar, use c option and for extracting replace c with x ==> $tar will remain same for both Lol :) . tar -cvf filename.tar file/dir_path && tar -xvf filename.tar.

Collapse
 
damian profile image
damian •

at least extracting is easy (say it in a german accent) tar -xzf "xtract ze files"

Collapse
 
dean profile image
dean •

Thank you so much.

Collapse
 
aminspeaks profile image
Amin Mohamed Ajani •

well what works for me is tar -xzvf "xtract ze vucking files"
No kidding that's how remember it

Collapse
 
jgauffin profile image
Jonas Gauffin • • Edited

Isn't that for zipped tar files? -xzf = extract zipped (tar) file.

Collapse
 
aminarria profile image
Amin Arria •

That's a great way! Jajajaaj

But it's important to note that tar is smart enough to detect the format so I prefer the general tar -vxf

Collapse
 
cdw9 profile image
Chrissy Wainwright •

and -czf == 'compress ze files'

Collapse
 
loilo profile image
Florian Reuschel •

Even though as a German with decent English pronunciation this is a little bit insulting, I'll probably never forget this ever again. Thanks! 🙈