this post was submitted on 18 Sep 2023
767 points (98.2% liked)

Linux

47361 readers
1741 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] perviouslyiner@lemm.ee 148 points 1 year ago (3 children)
[–] eager_eagle@lemmy.world 69 points 1 year ago (2 children)
[–] cooopsspace@infosec.pub 45 points 1 year ago (1 children)
[–] Celediel@slrpnk.net 5 points 1 year ago

Here, this should help.

load more comments (1 replies)
[–] bdonvr@thelemmy.club 52 points 1 year ago

It should be a crime to directly link XKCDs images without the corresponding page.

https://xkcd.com/1168/

I understand and sympathize with Rob on a spiritual level.

[–] Oha@lemmy.ohaa.xyz 78 points 1 year ago* (last edited 1 year ago) (1 children)

I remember it like this:
tar -extract ze file
and
tar -compress ze file

[–] Atemu@lemmy.ml 50 points 1 year ago

And also tar -the fuck is in this file

[–] blackstrat@lemmy.fwgx.uk 47 points 1 year ago (1 children)

I hope whoever thought -l should mean "check links" instead of list has a special place in Hell set aside for them.

I have no idea what print a message if not all links are dumped even means.

[–] happyhippo@feddit.it 7 points 1 year ago

Was gonna say this. Why TF is list not -l as...everywhere else?

[–] Maoo@hexbear.net 30 points 1 year ago (1 children)

No no it's this:

  1. Decide you've gotta use tar.

  2. man tar

  3. Guess-and-check the flags until it seems to work.

  4. Immediately forget the flags.

load more comments (1 replies)
[–] Zacryon@feddit.de 25 points 1 year ago (1 children)

Ah yes, that's the linux community as I know it. There is one thing someone wants to achieve and dozens of ways to do it. ;)

[–] pineapplelover@lemm.ee 9 points 1 year ago

Nah I just use 7z

[–] aard@kyu.de 18 points 1 year ago (8 children)

You also don't need the dash for the short options.

Also, if you're compressing with bzip2 and have archives bigger than a few megabytes I'll like you a lot more if you do it with --use-compress-prog=pbzip2

[–] sebastiancarlos@lemmy.sdf.org 26 points 1 year ago* (last edited 1 year ago) (1 children)

You also don’t need the dash for the short options.

True, but I refuse to entertain such a non-standard option format. It's already enough to tolerate find's.

[–] aard@kyu.de 16 points 1 year ago (2 children)

Technically the notation with dashes is the non-standard one - the dash form is a GNU addition. A traditional tar on something like Solaris or HP-UX will throw an error if you try the dash notation.

[–] sebastiancarlos@lemmy.sdf.org 21 points 1 year ago (1 children)

It's also traditional to eat raw meat, but we discovered fire at some point.

[–] aard@kyu.de 7 points 1 year ago (6 children)

Don't try to take my raw ground pork away from me.

load more comments (6 replies)
load more comments (1 replies)
[–] killeronthecorner@lemmy.world 10 points 1 year ago

You also don't need the dash for the short options.

You know when you meet someone and you're just like "oh boy, yeah, they're evil. No humanity at all"

load more comments (6 replies)
[–] walthervonstolzing@lemmy.ml 17 points 1 year ago

Those are straightforward; it's the remaining 900 options that are confusing. I always need to look up --excludes and always get --directory wrong, somehow.

[–] gibson@sopuli.xyz 17 points 1 year ago (1 children)

I don't think tar is actually hard, we are just in the time where we externalize more information into resources such as Google. Its the same reason why younger people don't remember routes by name or cardinal direction as much anymore.

side note: $ tldr is much better than man for just getting common stuff done.

[–] Aatube@kbin.social 8 points 1 year ago

Yes, but still tar options are kinda janky.

[–] miniu@programming.dev 16 points 1 year ago (7 children)

Why when explaining, giving examples of shell command are people so often providing shortened arguments. It makes it all seam like some random letters you have to remeber by heart. Instead of -x just write --extract. If in the end they endup using the tool so often they need to write it fast they'll check the shortcuts.

load more comments (7 replies)
[–] Gecko@lemmy.world 14 points 1 year ago

Or just use long-forms like

tar --create --file pics.tar ./pics

instead of

tar -cf pics.tar ./pics

or

tar --extract --file pics.tar```
instead of

tar -xf pics.tar


which is honestly way easier to remember... \^\^
[–] nucleative@lemmy.world 13 points 1 year ago (1 children)

I have to Google for this everytime. What I can never remember is how to check whether I should put my tar.gz into the subfolder first or risk getting a thousand files sprayed into my homedir.

load more comments (1 replies)
[–] arc@lemm.ee 10 points 1 year ago* (last edited 1 year ago) (4 children)

I know the basics off by heart. Not the hardest command syntax to learn all things considered.

The most annoying would be the growing collection of "uber commands" which are much more of a pain in the ass - aws, systemctl, docker, kubectl, npm, cargo, etc. - the executable has potentially dozens of subcommands, each of which has dozens of parameters.

[–] stilgar@infosec.pub 6 points 1 year ago

These "uber commands" tend to be much better since they are more explorable with --help explanations and readable flags.

Much better than the random jumble of characters you're expected to have memorised for awk, sed, find et al.

load more comments (3 replies)
[–] comrade_pibb@hexbear.net 9 points 1 year ago (1 children)

I always just use

"eXtract Zee Files"

load more comments (1 replies)
[–] lvxferre@lemmy.ml 8 points 1 year ago* (last edited 1 year ago)

As a mnemonic I usually read the "f" as "fucking":

  • tar, compress fucking pics.tar.gz with junk from ./pics
  • tar, extract fucking pics.tar.gz

That's only for scripting though. Most of the time I simply right-click the directory or archive, and let Engrampa deal with it.

[–] 520@kbin.social 8 points 1 year ago (4 children)

Simple:

tar -(whatever options you want here, my go to is xvzf or cvzf) archive-name.tar file/folder-to-compress

[–] cooopsspace@infosec.pub 21 points 1 year ago (1 children)

Create ze vuking file

Xtraxt ze vuking file

load more comments (1 replies)
load more comments (3 replies)
[–] HumanBehaviorByBjork@hexbear.net 7 points 1 year ago (2 children)

just now realizing that .tar files aren't compressed by default, and that that's the reason why it's always .tar.gz

load more comments (2 replies)
[–] freijon@feddit.ch 7 points 1 year ago
[–] Blackmist@feddit.uk 7 points 1 year ago

Yes, that's all very well, but you'll still need to find that image the next time you want to use it.

[–] Anticorp@lemmy.ml 7 points 1 year ago (1 children)
[–] peppy@lemmy.ml 13 points 1 year ago* (last edited 1 year ago) (1 children)

lists the files in the archive. So you don't need to extract the entire archive. Useful for huge archives.

[–] Anticorp@lemmy.ml 5 points 1 year ago
[–] helmet91@lemmy.world 7 points 1 year ago

Man page for dummies. Nice! I like it!

[–] twelve12@lemmy.ml 7 points 1 year ago (1 children)

dtrx is the way to do it. It's short for "do the right extraction", and it just works.

Also, all you have to remember for tar is "-xtract -zee -vucking -files" (extract the fucking files, but first letters only)

load more comments (1 replies)
[–] thantik@lemmy.world 6 points 1 year ago (1 children)

I usually just use tar -xvf {file} -- I like the verbosity when extracting just so I know it actually is doing things.

load more comments (1 replies)
[–] tricoro@lemmy.ml 6 points 1 year ago

Thank you, I still don't understand.

[–] Gamey@feddit.de 5 points 1 year ago (3 children)

I use Linux for years and still Google every time I have to use it!

load more comments (3 replies)
[–] nothacking@discuss.tchncs.de 5 points 1 year ago (3 children)

Just add -a for auto compression.

load more comments (3 replies)
load more comments
view more: next ›