There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

j4k3 ,
@j4k3@lemmy.world avatar

tar --version

WhoLooksHere ,

Or is it -v

tiredofsametab ,

Depends. Short options are probably safer if the particular version and flavor of tar are unknown.

0x4E4F ,
@0x4E4F@sh.itjust.works avatar

So you either het version or verbose…slick AF 😏.

saigot ,

-v is verbose

atx_aquarian ,
@atx_aquarian@lemmy.world avatar

I hitched my horse to just what I consider the basics–zip and unzip–and that has made it easy for me. But I’ve been stuck on those.

Extract anything:


<span style="color:#323232;">tar xf <archive_file>
</span>

Create a tbz2 archive:


<span style="color:#323232;">tar cjf <archive_file.tbz2> <stuff to put in it>
</span>

(And tossing in a -v is pretty universal, if that’s your thing.)

Some day, instead of commenting on a reddit Lemmy post, I think I’ll Google how to tell it to use .xz.

Ok, you know what? Today is finally that day. It’s just capital -J instead of lower-case -j! That’s easy enough to remember, I guess.

partial_accumen ,

Stay by the phone always. We may need you to defuse a bomb someday.

governorkeagan ,

Never thought I’d learn how to use tar on a meme post.

0x4E4F ,
@0x4E4F@sh.itjust.works avatar

Memes are one of the best source for Linux info 👍.

boredsquirrel ,

I guess man tar is cheating, but it is a command involving tar. Not a command using tar, but a tar command…

neoman4426 ,

I suppose tar --help would technically be a valid invoking of the binary itself if man tar doesn't

Emma_Gold_Man ,

But it would not work on older non-GNU versions of tar.

GNU introduced the “–foo” style long options, and it was a long time before Unix versions began adopting them.

bradorsomething ,

It didn’t say you could only enter one try, just that you had 10 seconds. The man page should give you something

boredsquirrel ,

True. But then I would use curl cheat.sh/tar

m4 ,

I just can recall tar xvzf but can't even remember what it's supposed to do.

Hawke ,

eXtract, Verbose, gZip, File.

Not sure why it doesn’t need the dash though.

r4venw ,
@r4venw@kbin.social avatar

I always learnt it as Xtract Zee File and to make a tar ball, you want to Compress Zee File

d00phy ,

The dash used to be how to could tell how long someone had been using tar. If they started with Linux, they probably use a dash. If they started on a UNIX variant, they probably don’t. Either way, the dash isn’t needed.

Also recently learned that recent versions of tar will autodetect compression. So for extraction, you just need “tar xf “

Hawke ,

Sacrilege.

best_username_ever ,

tar doesn’t need dashes because it’s weird.

eya ,
@eya@lemmy.dbzer0.com avatar

tar cJf file.tar.xz /path/to/file

tar xJf file.tar.xz /path/to/file.tar.xz -C /path/to/untar

is not very hard to remember

LainTrain OP ,

Unless you use it daily, I think that’s something I’d struggle with memorising, I’d just alias it tbh along with ls options

prettybunnys ,

tar -czvf tar_name.tar.gz ./

rockSlayer ,

Yep, have this one committed to memory. Though if it asked me to uncompress a tarball, then I’d be fucked

thejml , (edited )

tar xzvf this_awesome_file.tgz

… fixed. Apparently I can’t type.

hallettj ,
@hallettj@leminal.space avatar

I think you want to remove the c because that means “create” an archive, and you’re missing a z which applies gzip decompression/compression

_thebrain_ ,

I suppose it is tar version dependent, but on any recent Linux version I have used, you can just tar xvf <tar_name.tar.{z,gz,xz,etc}> and it will automatically figure out if it is compressed, what tools were used to compress it, and how to decompress it.

But you are right, x and c are mutually exclusive.

thejml ,

Yeap, apparently I can’t type. So, we’d all be dead anyway with that bomb.

gravitas_deficiency ,

QED 🫠

Aurenkin ,

File not found, now we are dead.

prettybunnys ,

Sounds like an error message from a valid tar command

v_krishna ,
@v_krishna@lemmy.ml avatar

I even read this aloud in my head as “CREATE ZE VUCKING FILE” in a particularly bad German accent same as over 20 years ago when a friend I worked for drilled it in my head.

RealPuyo ,

Read it in tf2 medics voice

Edgarallenpwn ,
@Edgarallenpwn@midwest.social avatar

I didn’t realize that was my default German voice in my head. Thx

gravitas_deficiency ,

lol that’s honestly a great mnemonic

tsonfeir ,
@tsonfeir@lemm.ee avatar

Anyone else make an untar.sh?

Magister ,
@Magister@lemmy.world avatar

tar, the tape archiver, I used it with tape, early 90s

FuglyDuck ,
@FuglyDuck@lemmy.world avatar

Sudo halt -fn

b3an ,
@b3an@lemmy.world avatar

Somehow, idk why. This one is stuck in my head:


<span style="color:#323232;">tar -zxvf filename.tar.gz
</span>
far_university1990 ,

tar xzvf

eXtract Ze Vucking File

Bread ,

I have to do this command often at work and I can never remember the letters perfectly. This is actually useful, thanks!

9point6 ,

Same, never used a mnemonic for it or anything, just

zxvf

Like it’s any other word

MonkderDritte , (edited )

z=zip (default in most tar), x=eXtract, v=verbose (not needed in most cases), f=target

prettybunnys ,

verbose … not needed?

If the words don’t happen how can I trust computer magic?

InFerNo ,

Yeah, how do I know that the PC isn’t slacking?

Slotos ,

Monitor the room temperature.

BestBouclettes ,

The bomb runs AIX. I’m sorry, you’re dead

MonkderDritte ,

tar zxvf filename.tar.gz file?

BestBouclettes ,

Nope, tar doesn’t handle compression on AIX. So it would be something like gzip -cd filename.tar.gz | tar xvf -

MonkderDritte ,

Ugh.

linearchaos ,
@linearchaos@lemmy.world avatar

I’ve never had a problem remembering tar, but properly using PV, somehow I’m just not able to store that information in my brain.

xkforce ,

Do people not use tab complete?

Voroxpete ,

Found the person who’s never used tar :-P

xkforce ,
  1. Thats not true and
  2. I am fully aware that there are 127 flags. That just makes this even sillier because you have so many valid options to disarm the bomb.
Zos_Kia ,
@Zos_Kia@lemmynsfw.com avatar

There’s an easy mnemonic for that : Compress Ze Vucking File !

synapse1278 ,
@synapse1278@lemmy.world avatar

Always think about tar commands in your best German accent !

JackGreenEarth ,

<span style="color:#323232;">tar -h
</span>
woelkchen ,
@woelkchen@lemmy.world avatar

Just tar, no arguments. Does nothing, still a valid command, no?

foobaz ,

Exit code 2 -> boom

rrconkle ,

<span style="color:#323232;">tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
</span><span style="color:#323232;">Try 'tar --help' or 'tar --usage' for more information.
</span>
doctorzeromd ,

Boom. tar --help for anyone wondering

Steamymoomilk ,

I just use ouch

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines