Just use Ouch!
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. ;)
Nah I just use 7z
Xtract Ze Vucking File!
I always did Xtract Ze File but I will add Vucking from now on, thanks!
You should link TealDeer, which is the same but it’s compiled in rust instead of node so it takes less memory, also, the name is cooler :)
You are absolutely right, this is way better. Thanks!
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.
PowerShell is so much worse.
I very much disagree, what are you referring to?
Powershell is horrible all right. What annoys me is they alias ls, dir and other common commands onto commands which don’t act or behave in the same way at all. I just run bash or command prompt rather than deal with the bs of powershell.
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.
^r tar
and adjust as needed. Got itIt should be a crime to directly link XKCDs images without the corresponding page.
I understand and sympathize with Rob on a spiritual level.
tar --help
cross fingers
deleted by creator
tar --hep
Fuck.
tar
is just the worst shell command in existence. Why do people still bother with it?You’ve never used
find
have you? Let’s not even get started on the config file syntax forsendmail
either.Because it is faster to transport one big ass tar than 10k individual files, and compression is waste of time.
@anteaters @sebastiancarlos a little knowledge really is a dangerous thing
What do you use instead?
I use zip/unzip if I have the option
atool is a good alternative apparently, but I am still new to it
I avoid it and use zip or 7z if I can. But for some crazy reason some people stil insist on using that garbage tool and I have no idea why.
If you want to do more than just “pack this directory up just as it is” you’ll pretty quickly get to the limits of zip. tar is way more flexible about selecting partial contents and transformation on packing or extraction.
100% of tarballs that I had to deal with were instances of “pack this directory up just as it is” because it is usually people distributing source code who insist on using tarballs.
Because everyone else does, and if everyone else does, then I must, and if I do, then everyone else must, and then everyone else does.
Repeat loop.
For all I care it goes on the same garbage dump as LaTeX.
I think that’s pretty mean towards the free software developers spending their spare time on Latex and the GNU utils.
I and many academics use Latex, and I personally am very happy to be able to use something which is plain text and FLOSS.
I also don’t see your problems with tar; it does one thing and it does it good enough.I also don’t see your problems with tar; it does one thing and it does it good enough.
The problem is the usage of the tool which people invent different mnemonics for because it’s UX is stuck in 1986 and the only people who remember the parameters are those who use it daily.
Similar thing for LaTeX: it’s so absurdly crusty and painful to work with it’s only used by people who have no alternative.
//ETA
Also, I don’t want to be mean towards the maintainers of LaTeX. I’m sorry if I made any LaTeX maintainer reading this upset or feel inferior. Working on the LaTeX code is surely no easy endeavour and people who still do that in 2023 deserve a good amount of respect.But everytime I had to work with LaTeX or any of its wrappers was just pure frustration at the usage and the whole project. The absolute chaos of different distributions, templates, classes and whatnot is something I never want to experience again.
speaking of which, you might want to check out typst if you haven’t heard of it - I really hope this replaces most uses of LaTeX in the next years.
Thanks I’ll keep an eye on that project. I did try pandoc and LyX in the past to ease the pain but typst appears to have the courage to finally let LaTeX be and not build a new wrapper around it.
You do you. Compression is waste of time; storage is cheap in that you can get more, but time? Time, you never get back.
as in time wasted transferring a highly compressible file that you didn’t bother compressing first?
it’s only a waste of time when the file format is already compressed.
Unless you measure your baud in dial up modem, it often can take longer to compress / transport / uncompress than just transfer directly.
unless you’re picking a slow compressor that’s not true at all
Original size | 100 GB Compressed size | 47.8 GB (2.091 ratio) Transfer speed | 1 Gbps (125 MB/s) Original transfer time | 100 GB / 125 MB/s = 800 seconds Compressed transfer time | 47.8 GB / 125 MB/s = 382.4 seconds Compressor | Snappy Compression ratio | 2.091 ratio Compression speed | 565 MB/s Decompression speed | 1950 MB/s Compression time | 100 GB / 565 MB/s = 177 seconds Decompression time | 47.8 GB / 1950 MB/s = 24.5 seconds Transfer time w/o compression | 800 seconds Transfer time with compression | 177 + 382.4 + 24.5 = 584.9 seconds
Add a zero to your link speed - 10Gbs
Yes, and I’d rather not have my time wasted by waiting on thousands of small files transfer, rather than just compressing it and the time spent of one file transferring being much smaller.
Tar achieves the same effect without time to compress and decompress.
Are zip and 7z really that much easier?
tar cf foo.tar.xz wherever/ zip -r foo.zip wherever/ 7z a foo.7z wherever/
I get that
tar
needs anf
for no-longer-relevant reasons whereas other tools don’t, but I never understood the meme about it beyond that. Isc
for “create” really that much worse thana
for “add”?7z x
to extract makes sense.unzip
even more. No need for crazy mnemonics or colorful explanation images. It’s complete nonsense that people are ok with that.
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.
Does every Linux command have options as words instead of single letters?
Many do as it’s considered good practice, but it’s not guaranteed, it just depends on the individual command (program). Usually you can use the
--help
option to see all the options, so for instancetar --help
.Most commands will have expanded arguments started with 2 dashes that usually look like ‘–verbose-name-of-option’, they’re usually listed in the man page/documentation along with the abbreviated letter version
Tar is as old as IT, that’s why it’s syntax is a bit special.
tar -xf
is not really special combining short options isn’t uncommon.Where tar is nonstandard is that you can leave out the
-
,tar xf
is actually how POSIX specifies it. And we’ve kinda come full circle on that one with many modern utilities using a command syntax, you can readtar xf
as “tar extract file” just as you can readgit pull
as, well, “git pull”.If you want to see a standard command with truly non-standard syntax have a look at
dd
.Nono, dash-parameters are new in fancy GNU tar. And POSIX is not old.
I don’t even mind the shortened arguments too much, though it doesn’t help. It’s more that every example seems to smush them together into a string of letters.
I would have found
tar -x -f pics.tar ./pics
to be clearer when I was learning. There’s plenty of commands which allow combining flags but every tar tutorial seems to do it from the beginning.
They are random letters you have to learn by hard. No one uses the long form. If someone just needs to use it one time they will copy the line from somewhere.
I usually just use
tar -xvf {file}
– I like the verbosity when extracting just so I know it actually is doing things.I usually skip the -v, because it’s much faster that way.
daily-standup.png eh… :)
Who is taking pics of the standup… :)
Those are straightforward; it’s the remaining 900 options that are confusing. I always need to look up
--exclude
s and always get--directory
wrong, somehow.I just use atool (archive tool) instead. It works the same for any common compression format (tar, gzip, zip, 7zip, rar, etc) and comes with handy aliases like
apack
andaunpack
obsoleting the need to memorize options.There’s ouch too.
ouch stands for Obvious Unified Compression Helper.
great name
Ouch doesn’t do 7z though
It seems like it supports LZMA files which I believe is what 7z files are?
Lzma is a compression algorithm, not (just) a file format
.7z files support lzma compression, but do not use it exclusively
Simple:
tar -(whatever options you want here, my go to is xvzf or cvzf) archive-name.tar file/folder-to-compress
Create ze vuking file
Xtraxt ze vuking file
oh my god, thank you for this
tar can do things other than this?
Oh I’m aware, I’m just saying this is what I normally do with it
I’m sorry, I was trying to be silly and poke fun at how most of us just use the one or two tar commands and it totally didn’t translate in text like it did my head. Have a wonderful day good internet stranger.