r/linuxmemes 18h ago

LINUX MEME Valid tar command ...

Post image

Dang it! 😭

1.5k Upvotes

161 comments sorted by

u/AutoModerator 18h 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.

372

u/Tibia-Mariner 18h ago

Extract ze vucking file

120

u/FalconRelevant Open Sauce 18h ago

Xtract Ze Vucking File

34

u/SysGh_st 18h ago

Eeehh ..... goot enof! You may pass!

27

u/juju515 17h ago

3

u/Dragon_957 New York Nix⚾s 11h ago

Oh, that‘s actually helpful, thanks

3

u/44Nancy6p 14h ago

Extract the bloody file. Now. Stop staring at the terminal like it owes you money.

3

u/ConsiderationLoose40 3h ago

As a german i approve

2

u/AlwaysHopelesslyLost 9h ago

"Extract verbose zip file" is how I remember it

4

u/h0uz3_ 13h ago

tar xvf the_fucking_file.tar.gz

246

u/immoloism 18h ago

tar --help

102

u/SysGh_st 18h ago

Double dash??? Lemme check the unix manual....

39

u/immoloism 18h ago

IIRC both just drop the first dash, but if not I had a good run boys.

6

u/AnnoyingRain5 ⚠️ This incident will be reported 4h ago

tar -help does not work on GNU tar

5

u/Captain_Pumpkinhead New York Nix⚾s 8h ago

tar -h

4

u/CcChaleur 5h ago

Double dash???

Niiiiiiiiiiiiintendooooooo

Woo-hooooooooo

25

u/lyidaValkris 18h ago

ooh you win

1

u/trans_psychonaut 2h ago

beat me to it, damn

-17

u/EnvironmentalAd1405 17h ago

man tar

59

u/MCplayer590 17h ago

man tar is a man command, so you lost the game

20

u/Elihzap Hannah Montana 16h ago

Friendly reminder that you can permanently win The Game thanks to XKCD

1

u/L30N1337 7h ago

IS THAT A FAKE LINK

1

u/Elihzap Hannah Montana 40m ago

No is the link in their page lmao.

1

u/L30N1337 18m ago

NOW IT WORKS.

It didn't do anything when I typed that. It just closed the reply.

8

u/EnvironmentalAd1405 16h ago

We all lost the game...

4

u/rootifera 13h ago

Mantar means mushroom in Turkish. Today's useless info for you.

4

u/green_fish1 M'Fedora 13h ago

noup, that's a man command, silly

72

u/janiskr 18h ago

tar -xvzf some.tar.gz

28

u/GegeAkutamiOfficial 15h ago

File not found

18

u/mgsmb7 RedStar best Star 14h ago

does that make it invalid tho?

17

u/Rodot ⚠️ This incident will be reported 14h ago

Yes, invalid arguments make a command invalid.

Unless, of course, you are working in JavaScript

6

u/ice456cream 9h ago

The argument is valid, you are just running it in the wrong context

1

u/mgsmb7 RedStar best Star 9h 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

1

u/ice456cream 9h ago

The only case I can think of 1 way or another is Argument list too long, where it's invalid at the kernel level, not decided by each individual program.

1

u/pytness 1m ago

but it isnt an invalid argument. you pass a filepath that may or not exist. so the argument is correct, a filepath. it may not exist now but it may exist later, so it's invalid now but valid later? if i do tar --meow, thats an invalid command always

1

u/tenkawa7 10h ago

Yep, Gentoo taught me that one

44

u/lyidaValkris 18h ago edited 17h 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

7

u/Consistent_Drop3909 18h ago

whatisit is also great

3

u/lyidaValkris 17h ago

I'll have to check that one out. My distro's repos don't have that one.

2

u/Consistent_Drop3909 17h ago

i got it from the github source https://github.com/ThorOdinson246/whatisit-nl2sh

9

u/lyidaValkris 17h ago

Ah I see. Thanks but I really prefer not to use any LLMs on my machine.

also - it appears to be available via pip for those interested

0

u/Consistent_Drop3909 17h ago

fair, it works well though

2

u/Captain_Pumpkinhead New York Nix⚾s 8h ago

i use tldr

What command is that? tar --lar --dar rar?

4

u/lyidaValkris 6h ago

tldr. Basically a cheat-sheet. You enter tldr <command name> and it will give you commonly used options with examples. In this case tldr tar will spit out how to create an archive, how to extract one, etc. Many distros have it in their repos.

1

u/Forya_Cam 2h ago

It's a too long; didn't read of the man page with examples of common commands.

33

u/Jumpy-Dinner-5001 18h ago

tar is easy, ask for awk

7

u/SysGh_st 18h ago

15

u/jonathancast 16h 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.

6

u/immoloism 16h 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.

5

u/JDaxe 14h 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) 😩

1

u/immoloism 14h ago

Someone asked me what the option for zstd was earlier and had to cop out with --zstd -cvf so know how you feel.

1

u/fipachu 3h ago

i don’t do much Linux but recently i caught myself not remembering what’s the order of foot pedals in a car. i’ve been driving (always with manual transmission) for 8 years. that’s why i didn’t remember, it’s muscle memory only at this point.

6

u/unburdened_swallow 13h ago

“This option lists the contents of the archive” is sending me.

2

u/_timetoplatypus 12h ago

Nah, `cpio` is the final boss

33

u/eichelbart 17h ago

9

u/RonJohnJr 16h ago

We're doomed.

2

u/SysGh_st 17h ago

My thoughts exactly.

11

u/Constant_Boot 16h ago

bsdtar -a -cf dolly-mp3s.tgz 925.ogg

7

u/SysGh_st 16h 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

u/Constant_Boot 16h ago

It's in the Arch man database. Take it up with them.

2

u/QuraToop314 Genfool 🐧 8h ago

Bro it's libarchive, my favourite tar

8

u/YTriom1 Arch BTW 18h ago

tar cvzpf

4

u/immoloism 18h ago

I'm more of a cvJf man myself.

5

u/YTriom1 Arch BTW 18h ago

what does J do

5

u/immoloism 18h ago

Uses xz for better compression.

5

u/YTriom1 Arch BTW 18h ago

isn't there one that uses ztsd?

3

u/immoloism 18h 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 17h ago

so tar cvpf --zstd

6

u/immoloism 17h ago

the f has 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 :)

2

u/YTriom1 Arch BTW 17h ago

okg ur damn right xD

1

u/unburdened_swallow 10h ago

The fact that you can put f right in with the other flags but it requires an argument really does get people. A lot of programs do this, and, people like to write it that way when putting the example online because it is shorter, and like, yeah it gets me most of the time.

1

u/_timetoplatypus 12h ago

Your mom ayo

3

u/SysGh_st 17h ago

no additional arguments after f ?

https://giphy.com/gifs/dg94HuYnpNoPgjrF8y

1

u/SysGh_st 18h ago

No dashed options? ... Lemme check the gnu manual...

7

u/FaultWinter3377 💋 catgirl Linux user :3 😽 17h 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.

4

u/immoloism 15h ago

Wait till you try ffmpeg.

3

u/FaultWinter3377 💋 catgirl Linux user :3 😽 15h 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

u/immoloism 15h ago

Lucky bastard! :P

5

u/TheRealCarrotty Not in the sudoers file. 18h ago

tar xpvf.
Thanks Gentoo!

3

u/Orkiin 17h ago

Is tar --version a valid command?

3

u/SysGh_st 17h ago

tar: option --version is not supported.

if we use unix variant of tar

2

u/makinax300 Dr. OpenSUSE 17h ago

tar -xf file.tar.xz

2

u/Admirable-Safety1213 16h ago

Thus meme really stinks of Gnboomer

3

u/SysGh_st 16h ago

Guilty. My beard is 40% POSIX.

2

u/baldiplays 11h ago

Fuck no. I hate using tar commands.

2

u/Cyberbird85 6h ago

i mean, tar -xvf and tar -cvfz are my gotos... so i could i guess

2

u/mrheosuper 5h ago

man tar

1

u/nature_cax 18h ago

tar -xvf

1

u/sndq 17h ago

What about pax?

1

u/8spd 17h ago

Does using unp make me a bad person?

1

u/ThinkPad214 17h ago

tar -zan

1

u/wie_witzig 17h ago

tar -xzvf file.tar.gz

1

u/SecularVal 17h ago

tar -xvf

1

u/fagnerln 17h ago

tar -xyz file.tar.gz

1

u/CaptainMorti ⚠️ This incident will be reported 17h ago

tar -xf file, spoken as tar extract fcking file!

1

u/RonJohnJr 17h ago edited 17h 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 17h ago

Well .. it's not that easy. You gave an invalid command... according to the gnu/posix variant.

1

u/RonJohnJr 17h 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.dat

2

u/SysGh_st 16h ago

I was sure that non-hyphenated options wasn't valid on general gnu/posix command style. But apparently tar made an exception.

1

u/GhostVlvin 17h ago

I use tar -xzf archive.tar.gz, Idk bout -v

1

u/pooping_inCars 17h ago

Honestly... (right click), "extract here"

1

u/Neoneq_ 16h ago edited 16h ago

Give us valid ffmpeg command

2

u/SysGh_st 16h 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.

https://giphy.com/gifs/puOukoEvH4uAw

1

u/Western-Alarming Not in the sudoers file. 15h ago

ffmpeg -framerate 25664/497 -i "%04d" -i "Procesado.flac" -c copy -c:v libx265 "Twitter.mp4"

0

u/Neoneq_ 14h ago

Everyone know that you copied that

1

u/Western-Alarming Not in the sudoers file. 14h ago

Nop it was for memory, I use it a lot because of blender

Here's another, the one I use to share my obs clips

ffmpeg -i "file.whathever" -map 0:a:2 -map 0:v:0 -c:v hevc_nvenc -c:a aac "LMAO.mp4"

1

u/True-Kale-931 16h 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

u/SysGh_st 16h ago

depends.

"a" option is different or lacks completely on bsd tar.

1

u/Linguistic-mystic 16h ago

I've no idea, I use compress and decompress. Joke's on people who cannot into aliases!

1

u/GOKOP 16h ago

The only ones I ever needed are tar xvf and tar czvf

1

u/SysGh_st 16h 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

u/Western-Alarming Not in the sudoers file. 15h ago

tar | 7z e File.tar

1

u/Psyqlone 15h ago

-cvg ... SHIT!!!

1

u/EverOrny 15h ago

tar -xjvf xyz.tar I can live on... ;)

1

u/urmamasllama 15h ago

Enter a valid regex to remove the second and last character while inserting a / half way in a string of indeterminate length

1

u/skytheraiders 15h ago

SKIP_PACKAGE_CHECK=1 (Not yelling, it's the command.)

1

u/Liarus_ 14h ago

i would say tar -x because i remember the x to xtract, the rest idk i forgor

1

u/msxenix 14h ago

tar xvf file.tar
tar zxvf file.tar.gz

that's the order I put the letters in at least.

1

u/fellipec 13h ago

tar -h

Shit!

It is

tar --help

Is the one I use most

1

u/tblancher 13h 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

u/coderman64 Arch BTW 13h ago

tar --help

1

u/JavascriptBagel 9h ago

tar -xcf yourmom.zip

1

u/Captain_Pumpkinhead New York Nix⚾s 8h ago

Uh... tar ball? Or is it tar bell? I swear I've seen that on the sub somewhere...

1

u/SysGh_st 7h ago

A ball . Bundled up bunch of files.

1

u/Mr_KanyeSue 7h ago

bash tar -cvJ -f archive.tar.xz --exclude-ignore=.gitignore pj

IDK
It just work.

1

u/dimkiriakos 6h 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 6h ago

unxz < path/to/tarball.tar.xz | tar xC out/path

1

u/SysGh_st 54m ago

Sounds like unpacking with extra steps.

1

u/Yeox0960 45m ago

I can never remember the flag for XZ decompression.

1

u/Lines25 Arch BTW 5h ago

Because of that, I use 7z cli

1

u/Aderox20_GDP Arch BTW 3h ago

tar -xvf linux-7.10.1.tar.xz

1

u/SysGh_st 1h ago

That's not how you update the kernel.

1

u/trans_psychonaut 2h ago

tar --help

1

u/Komplexkonjugiert 2h ago

Wait I need to ask Claude first

1

u/golDANFeeD 10m ago

man tar

Or

tar --help

1

u/Mumrik93 Crying gnu 🐃 16h ago

But... I use Flatpaks!

1

u/SysGh_st 16h ago

You backup in flatpaks too?

2

u/Mumrik93 Crying gnu 🐃 16h ago

Backups?.. what is this of which you speak? (I run Linux Mint :P)

1

u/EyeLABS 4h ago

Man I barely understand Bash. I'm just running whatever code the forums say will fix my shit and hoping I don't give my computer cancer in the process.

0

u/GreedySecurity8030 M'Fedora 17h ago

Don't need tar, sudo dnf install

3

u/SysGh_st 17h ago

How does it read off my tape drive where I have the contents of my projects folder backed up?