tar --help
linuxmemes
Hint: :q!
Sister communities:
- LemmyMemes: Memes
- LemmyShitpost: Anything and everything goes.
- RISA: Star Trek memes and shitposts
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
- Understand the difference between a joke and an insult.
- Do not harrass or attack members of the community for any reason.
- Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
- Bigotry will not be tolerated.
- These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
3. Post Linux-related content
- Including Unix and BSD.
- Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of
sudo
in Windows. - No porn. Even if you watch it on a Linux machine.
4. No recent reposts
- Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
Please report posts and comments that break these rules!
You just killed us all by putting a space between the dashes
Or by using gnu style options on potentially bsd tar
tar -h
Just tar
, no arguments. Does nothing, still a valid command, no?
Exit code 2 -> boom
tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.
Boom. tar --help
for anyone wondering
I do tax -xvf filename
tax
Boom.
ah fuck, didn't even notice
Christ this comment chain is perfect lmfao
I like the way you pointed that out lmao
.... aaaaaand you've killed us all.
tar -czvf tar_name.tar.gz ./
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.
Somehow, idk why. This one is stuck in my head:
tar -zxvf filename.tar.gz
tar xzvf
eXtract Ze Vucking File
I have to do this command often at work and I can never remember the letters perfectly. This is actually useful, thanks!
How does it verify the command is valid? Does it run what I enter?
If so, just give it an infinite loop followed by some attempt at a tar command:
while true; do :; done; tar -xyz
Next time I build a bomb I let the timer continue while the command is running.
Yeah, what kind of idiot doesn't parallelize their timer function.
Blue Team: "Okay everyone let's make sure this is absolutely the correct input"
Red Team: "Lmao lets try this 90mb list of bash command injection patterns"
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:
tar xf <archive_file>
Create a tbz2 archive:
tar cjf <archive_file.tbz2> <stuff to put in it>
(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.
Stay by the phone always. We may need you to defuse a bomb someday.
tar -cvzf /etc/
Edit: we're dead :(
Actually this reminds me, what is the deal with tar command recommendations to use or not use dash? I know GNU tar accepts both (e.g.) tar xvf file.tar
and tar -xvf file.tar
, but at some points people were like "NO! Don't use the dash! It's going to maybe cause issues somewhere, who knows!" and I was like "OK". Something to do with people up designing the Unix specs?
I just can recall tar xvzf
but can't even remember what it's supposed to do.
eXtract, Verbose, gZip, File.
Not sure why it doesn’t need the dash though.
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 “
I always learnt it as Xtract Zee File and to make a tar ball, you want to Compress Zee File
Remember: Just tell tar to Xtract Z File.
Xtract gZipped File