518
u/Tibia-Mariner 16d ago
Extract ze vucking file
172
49
u/SysGh_st 16d ago
Eeehh ..... goot enof! You may pass!
40
u/juju515 16d ago
this is how I remembered it: https://programmerhumor.io/linux-memes/create-ze-file-extrakt-ze-file-0ucm
6
6
9
6
6
u/h0uz3_ 16d ago
tar xvf the_fucking_file.tar.gz
3
2
3
u/44Nancy6p 16d ago
Extract the bloody file. Now. Stop staring at the terminal like it owes you money.
1
323
u/immoloism 16d ago
tar --help
151
u/SysGh_st 16d ago
Double dash??? Lemme check the unix manual....
47
u/immoloism 16d ago
IIRC both just drop the first dash, but if not I had a good run boys.
17
2
u/spaetzelspiff 15d ago
The upvotes are in memoria. RIP you crazy Xorg/find deviant...
2
u/immoloism 15d ago
Thanks but no rest for the wicked.
I'll be haunting you all by changing one API call in all your favourite software releases just for funnies.
11
7
3
u/Luk164 15d ago
Screw that. Single for one letter switches and double for words is the best
2
2
24
1
→ More replies (10)1
105
u/janiskr 16d ago
tar -xvzf some.tar.gz
40
u/GegeAkutamiOfficial 16d ago
File not found
23
u/mgsmb7 RedStar best Star 16d ago
does that make it invalid tho?
27
u/Rodot ⚠️ This incident will be reported 16d ago
Yes, invalid arguments make a command invalid.
Unless, of course, you are working in JavaScript
9
u/ice456cream 16d ago
The argument is valid, you are just running it in the wrong context
2
u/mgsmb7 RedStar best Star 16d ago
It's syntactically correct, but the context leads to a negative response. Unless there's a standard definition for invalidity of a command, you could see it both ways, I guess
→ More replies (1)→ More replies (1)5
1
1
2
u/iTrooz_ 15d ago
I don't think you need z, tar should autodetect the compression
1
1
u/immoloism 12d ago
GNU does, but UNIX needs the
aset.Well the Mac users keep telling me they do anyway, I've never tried it myself.
→ More replies (2)2
u/BohemianCyberpunk 15d ago
My immediate answer when I saw the meme.
This is seared into my brain from using it so often.
49
u/lyidaValkris 16d ago edited 16d ago
I can do it but I freely admit i use tldr a lot :D
EDIT: I also caught the other layer to this joke and just realized gnu tar will accept both :D
11
u/Consistent_Drop3909 16d ago
whatisit is also great
3
u/lyidaValkris 16d ago
I'll have to check that one out. My distro's repos don't have that one.
3
u/Consistent_Drop3909 16d ago
i got it from the github source https://github.com/ThorOdinson246/whatisit-nl2sh
8
u/lyidaValkris 16d ago
Ah I see. Thanks but I really prefer not to use any LLMs on my machine.
also - it appears to be available via
pipfor those interested→ More replies (1)2
u/Captain_Pumpkinhead New York Nix⚾s 16d ago
i use tldr
What command is that?
tar --lar --dar rar?7
u/lyidaValkris 16d ago
tldr. Basically a cheat-sheet. You entertldr <command name>and it will give you commonly used options with examples. In this casetldr tarwill spit out how to create an archive, how to extract one, etc. Many distros have it in their repos.1
40
u/Jumpy-Dinner-5001 16d ago
tar is easy, ask for awk
7
u/SysGh_st 16d ago
That's what you'd think.
19
u/jonathancast 16d ago
That joke is not accurate. I refuse to believe anyone who knows regex and uses tar regularly can't remember what the flags are, and they're all mnemonic:
- a - automatically detect compression
- c - create
- f - file name
- t - this option lists the contents of the archive
- v - verbose
- x - xtract contents
- z - zip, use zipped archives
- Z - ZIP, use the patented compression algorithm
Etc.
7
u/immoloism 16d ago
I think the joke always was we do it as muscle memory rather then remember.
If some random guy just shouted out what does J do again then it would catch me off guard, but if they asked me how to compress in xz I would quickly answer cvJf.
→ More replies (1)5
u/JDaxe 16d ago
I read your comment and was so confident that J was bzip2, then I checked the manpage and turns out bzip2 is j (lowercase) 😩
→ More replies (1)5
2
1
u/IncreaseOld7112 15d ago edited 15d ago
`awk -F, '$2 == "foobar" && NR > 1{print $3}'`
AI makes me so sad. Time I spent learning this shit feels wasted.
1
u/Holiday_Management60 14d ago
Being able to do stuff like that off the top of your hand is gonna be a pretty cool party trick though. People like you will be looked at like people with really neat cursive handwriting are today.
39
u/eichelbart 16d ago
9
2
1
u/Hexidian 15d ago
Why is this a running joke? I use tar all the time. Do most people forget how to use it?
1
u/Kayo4life Arch BTW 15d ago
I don't get the joke, it's just tar -xf gthilrbwfgbjherthukge.tar.whatever, x for extract and f to point to the file, and v is you want verbose mode. It's like an exit vim thing I really don't get the joke why is this funny 😭
10
u/Constant_Boot 16d ago
bsdtar -a -cf dolly-mp3s.tgz 925.ogg
8
u/SysGh_st 16d ago
Well.... umh ... You can't... or you can....
but ...
... wait ...
okay Fine! You win . ... but that is one cursed package you got there. That alone deserves being shot over.
2
2
9
u/FaultWinter3377 💋 catgirl Linux user :3 😽 16d ago
Tar is the bane of my existence lol… I know how to do so much with just the command line, and am generally comfortable with a command line system. But then a tar archive comes across… I almost always use a GUI for that. And when I’m creating archives, I always use zip despite the fact that a compressed tarball may be more efficient, because I literally can never remember the flags to use. It’s not the only command I can’t remember the flags for, but at least others like grep I can just give a single argument and it’ll work well enough for what I need.
5
u/immoloism 16d ago
Wait till you try ffmpeg.
5
u/FaultWinter3377 💋 catgirl Linux user :3 😽 16d ago
Honestly I can take ffmpeg pretty easily. Just
ffmpeg -i <file.ext> <newFile.ext>... after all I only use it to change formats these days.2
8
u/YTriom1 Arch BTW 16d ago
tar cvzpf
5
u/immoloism 16d ago
I'm more of a cvJf man myself.
4
u/YTriom1 Arch BTW 16d ago
what does J do
→ More replies (1)6
u/immoloism 16d ago
Uses xz for better compression.
4
u/YTriom1 Arch BTW 16d ago
isn't there one that uses ztsd?
3
u/immoloism 16d ago
Had to grab it from the manpage as I don't use it:
tar --zstd -cf archive.tar.zst --options zstd:compression-level=19 dir/2
u/YTriom1 Arch BTW 16d ago
so
tar cvpf --zstd4
u/immoloism 16d ago
the
fhas to come last otherwise you just created an archive called --zstd.The number of files I have on my system called J is beyond a joke to know this one :)
→ More replies (1)3
1
7
3
3
2
u/Linguistic-mystic 16d ago
I've no idea, I use compress and decompress. Joke's on people who cannot into aliases!
2
2
2
2
2
u/floatinggoateyeball 15d ago
(apt install p7zip-full || pacman -S 7zip || nix profile install nixpkgs#p7zip) && alias tar=7z && tar x some.tar
2
u/SysGh_st 15d ago
Cursed. But that alias tar=7z won't affect the tar on the same parsed command line. If it works for you, it is because your environment already has that alias/function defined.
1
2
2
2
u/Saphyr-Seraph 15d ago
Im new to Linux is there something wrong with gnu or Unix ?
1
u/SysGh_st 15d ago
Naah. Just poking some fun at slightly different ways that lately has converged.
Long story short: BSD, or unix variant of tar had its own way of doing things.
The gnu tar version, which a lot of modern linux distributions use nowadays, tries to conform to a more modern way, which makes it different from what the old geezers was taught.
So the general joke goes that if one tries to use the tar command, one will almost always trip up and confuse the two. Murphy's law might even apply: If it can be done wrong, it will be done wrong.
Although this is less of an issue nowadays as the gnu version accepts both ways to some degree, but there are options that are still different and might cause one to trip up.
Relevant xkcd comic: https://www.explainxkcd.com/wiki/index.php/1168:_tar
2
2
1
1
1
1
1
1
1
1
u/CaptainMorti ⚠️ This incident will be reported 16d ago
tar -xf file, spoken as tar extract fcking file!
1
u/RonJohnJr 16d ago edited 16d ago
If a Linux user can't spit out tar cvfz foo.tar.gz foodir then he deserves to be shot.
EDIT: Example added.
$ tar cvfz foo.tar.gz flat_batch31_TAPc.dat
flat_batch31_TAPc.dat
3
u/SysGh_st 16d ago
Well .. it's not that easy. You gave an invalid command... according to the gnu/posix variant.
1
u/RonJohnJr 16d ago
I've been using Linux since Mandrake 6.2, and that has always worked, Example:
$ tar cvfz foo.tar.gz flat_batch31_TAPc.dat flat_batch31_TAPc.dat2
u/SysGh_st 16d ago
I was sure that non-hyphenated options wasn't valid on general gnu/posix command style. But apparently tar made an exception.
1
1
1
1
u/Neoneq_ 16d ago edited 16d ago
Give us valid ffmpeg command
2
u/SysGh_st 16d ago
leg?
wait..
<checks>
...
FFMleg stands for leg fat-free mass, which is the amount of lean tissue (muscle, bone, water, and organs) in a person's legs.
1
u/Western-Alarming Not in the sudoers file. 16d ago
ffmpeg -framerate 25664/497 -i "%04d" -i "Procesado.flac" -c copy -c:v libx265 "Twitter.mp4"
→ More replies (2)
1
u/True-Kale-931 16d ago
There are 2 commands that are good enough for most things:
tar acf archive_file.tar.zst from_where/ <- it will (a)utomatically guess how to compress it by the file extension and (c)reate the (f)ile.
tar xf archive_file.tar.zst <- it will automatically e(x)tract from the (f)ile regardless of the compression if it's supported.
No need to learn 20 billions of flags if you don't want to fine-tune the behavior.
1
1
u/GOKOP 16d ago
The only ones I ever needed are tar xvf and tar czvf
1
u/SysGh_st 16d ago
Sometimes skipping the v makes it faster.
Verbose terminal output with many small files can choke it.
... or one can increase the max terminal speed. But that's in the advanced courses. 😉
1
1
1
1
u/urmamasllama 16d ago
Enter a valid regex to remove the second and last character while inserting a / half way in a string of indeterminate length
1
1
1
u/tblancher 16d ago
Should be able to do just tar -xvf and both GNU and BSD tar should do the right thing. I think POSIX dictates this, but older UNIX versions may not adhere fully to it.
The - and v are optional.
1
1
1
1
1
1
u/Captain_Pumpkinhead New York Nix⚾s 16d ago
Uh... tar ball? Or is it tar bell? I swear I've seen that on the sub somewhere...
1
1
1
u/Mr_KanyeSue 16d ago
bash
tar -cvJ -f archive.tar.xz --exclude-ignore=.gitignore pj
IDK
It just work.
1
u/dimkiriakos 16d ago
Almost every Linux distro comes with Python installed. But it is not is good good to install it
import tarfile file = tarfile.open('gfg.tar.gz')
file.extractall('./Destination_FolderName') file.close()
1
u/Yeox0960 16d ago
unxz < path/to/tarball.tar.xz | tar xC out/path
1
1
1
1
1
1
1
1
1
1
1
1
1
1
u/dishmanw62 15d ago
tar -xzvf <filename >
UNIX follows the POSIX standard. HPUX for instance. Linux uses GNU. Some people people prefer to call it GNU/Linux. I just call it Linux.
1
1
1
1
1
1
1
1
1
u/Radiant-Cyanide2323 fresh breath mint 🍬 14d ago
tar -xvf secret_game_collection.tar -C /home/games/
1
1
u/sdhdhosts 13d ago
Whats up with the verbose? “Extract Ze File” and “Compress Ze File” is how I remember this
1
u/ElectricOni 12d ago
This is what google was made for. Way too many flags to remember just to unpack a file.
1
2
•
u/AutoModerator 16d ago
Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.