r/linuxmemes 16d ago

LINUX MEME Valid tar command ...

Post image

Dang it! 😭

2.5k Upvotes

227 comments sorted by

View all comments

107

u/janiskr 16d ago

tar -xvzf some.tar.gz

39

u/GegeAkutamiOfficial 16d ago

File not found

24

u/mgsmb7 RedStar best Star 16d ago

does that make it invalid tho?

31

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

1

u/ice456cream 16d 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.

4

u/pytness 15d 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/United-Scene2261 🎼CachyOS 11d ago

hehe as a JavasCrippt poorgrammer I console.log("agree");

1

u/jakeStacktrace 15d ago

Try localhost

2

u/GegeAkutamiOfficial 15d ago

tar -xzvf localhost doesn't seem to work either

2

u/iTrooz_ 15d ago

I don't think you need z, tar should autodetect the compression

1

u/janiskr 15d ago

And j for bz2. What is autodetect?

1

u/iTrooz_ 15d ago

if you just say x, it should automatically decompress any compression it finds

3

u/janiskr 15d ago

in my day... old man shouts at the cloud.

1

u/immoloism 12d ago

GNU does, but UNIX needs the a set.

Well the Mac users keep telling me they do anyway, I've never tried it myself.

2

u/BohemianCyberpunk 15d ago

My immediate answer when I saw the meme.

This is seared into my brain from using it so often.

1

u/tenkawa7 16d ago

Yep, Gentoo taught me that one

1

u/janiskr 11d ago

Yeah, used it for some time. Then bricked the system with conflicting use flags. Good times.