perviouslyiner ( @perviouslyiner@lemm.ee ) English125•10 months ago bdonvr ( @bdonvr@thelemmy.club ) 44•10 months agoIt should be a crime to directly link XKCDs images without the corresponding page.
TheSaneWriter ( @TheSaneWriter@lemmy.thesanewriter.com ) English5•10 months agoI understand and sympathize with Rob on a spiritual level.
ɐɥO ( @Oha@lemmy.ohaa.xyz ) 65•10 months agoI remember it like this:
tar -extract ze file
and
tar -compress ze file Atemu ( @Atemu@lemmy.ml ) 41•10 months agoAnd also tar -the fuck is in this file
exscape ( @exscape@kbin.social ) 14•10 months agoz is for gz files only though, there are plenty of others. xf autodetects and works with all of them (with GNU tar att least).
blackstrat ( @blackstrat@lemmy.fwgx.uk ) English37•10 months agoI 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 ( @happyhippo@feddit.it ) 6•10 months agoWas gonna say this. Why TF is list not -l as…everywhere else?
aard ( @aard@kyu.de ) 19•10 months agoYou 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
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 ( @aard@kyu.de ) 16•10 months agoTechnically 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.
It’s also traditional to eat raw meat, but we discovered fire at some point.
aard ( @aard@kyu.de ) 9•10 months agoDon’t try to take my raw ground pork away from me.
Lvxferre ( @lvxferre@lemmy.ml ) 3•10 months agomy raw ground pork away from me.
Who are you, the Mett demon?
\
(It works great with beef, too. Bonus points for the raw yolk over it. If not homemade though there’s literally one bar that I trust with this, salmonella is not fun.)
aard ( @aard@kyu.de ) 2•10 months agoNot enough onions. Your average mettigel has better mett/onion ratio.
Damage ( @Damage@feddit.it ) 3•10 months agoI got toxoplasmosis that way
Leo ( @leo@lemmy.linuxuserspace.show ) English2•10 months agoThat’s an audible “yuck” from me, man. Well done!
Björn Tantau ( @bjoern_tantau@swg-empire.de ) 4•10 months agoLooks like you Mett your match.
Blizzard ( @Blizzard@lemmy.zip ) English3•10 months agoCan’t be well done if it’s raw.
TheSaneWriter ( @TheSaneWriter@lemmy.thesanewriter.com ) English1•10 months agoI like the dashes, they make the options look like options to me.
Programmer Belch ( @programmer_belch@lemmy.dbzer0.com ) English2•10 months agoI think the
-j
also compresses with bzip2 but I’m not sure if this is defined behavior or just a shortcut aard ( @aard@kyu.de ) 3•10 months agoYes, but I’m asking you to use pbzip. bzip at best utilizes one core, both for packing and unpacking. pbzip uses as many cores as IO bandwith allows - with standard SATA SSDs that’s typically around 30.
pbzip can only utilize multiple cores if the archive was created with it as well.
Programmer Belch ( @programmer_belch@lemmy.dbzer0.com ) English2•10 months agoDoes something similar happen using
xz
? Programmer Belch ( @programmer_belch@lemmy.dbzer0.com ) English2•10 months agoI’ve searched for it and xz also doesn’t use multithreading by default, you can change the program tar uses to compress by passing the
-I
option. For xz using all possible CPU threads:tar -cv -I 'xz -6 -T0' -f archive.tar.xz [list of directories]
The number indicates the compression ratio, the higher the number, the more compressed the archive will be but it will cost more in terms of memory and processing time
TheSaneWriter ( @TheSaneWriter@lemmy.thesanewriter.com ) English1•10 months agoThanks for answering your own question, this is useful information.
tony ( @tony@lemmy.hoyle.me.uk ) English2•10 months agoThere’s nothing technically wrong with using xjf rather than xzf, but it’ll bite you if you ever use a non-linux platform as it’s a GNU extension. I’m not even sure busybox tar supports it.
Zacryon ( @Zacryon@feddit.de ) 17•10 months agoAh 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. ;)
/home/pineapplelover ( @pineapplelover@lemm.ee ) 5•10 months agoNah I just use 7z
wvstolzing ( @walthervonstolzing@lemmy.ml ) 17•10 months agoThose 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. miniu ( @miniu@programming.dev ) 16•10 months agoWhy 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.
catacomb ( @catacomb@beehaw.org ) English7•10 months agoI 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.
ExLisper ( @ExLisper@linux.community ) English3•10 months agoThey 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.
bullshitter ( @bullshitter@lemm.ee ) 2•10 months agoDoes every Linux command have options as words instead of single letters?
MonkderZweite ( @MonkderZweite@feddit.ch ) 6•10 months agoTar is as old as IT, that’s why it’s syntax is a bit special.
barsoap ( @barsoap@lemm.ee ) 4•10 months agotar -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
. MonkderZweite ( @MonkderZweite@feddit.ch ) 1•10 months agoNono, dash-parameters are new in fancy GNU tar. And POSIX is not old.
sonnenzeit ( @sonnenzeit@feddit.de ) 3•10 months agoMany 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
. Zangoose ( @Zangoose@lemmy.one ) 2•10 months agoMost 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
gibson ( @gibson@sopuli.xyz ) 12•10 months agoI 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 ( @Aatube@kbin.social ) 8•10 months agoYes, but still tar options are kinda janky.
d00phy ( @d00phy@lemmy.ml ) 11•10 months agoThe “-“ is often not necessary. I use it as a guide to see how long the person running tar has been using it.
Example:
tar -xf file.tar == tar xf file.tar
Fushuan [he/him] ( @fushuan@lemm.ee ) English5•10 months agoThey are functionally flags though and uniletter flags should be preceded by a ‘-’, so I would still prefer to have the ‘-’ written, because it conforms with the standard.
Ricaz ( @Ricaz@lemmy.ml ) 2•10 months agoBut muh POSIX
520 ( @520@kbin.social ) 9•10 months agoSimple:
tar -(whatever options you want here, my go to is xvzf or cvzf) archive-name.tar file/folder-to-compress
cooopsspace ( @cooopsspace@infosec.pub ) English17•10 months agoCreate ze vuking file
Xtraxt ze vuking file
barkingspiders ( @barkingspiders@infosec.pub ) English4•10 months agotar can do things other than this?
520 ( @520@kbin.social ) 2•10 months agoOh I’m aware, I’m just saying this is what I normally do with it
barkingspiders ( @barkingspiders@infosec.pub ) English3•10 months agoI’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.
Gamey ( @Gamey@feddit.de ) 7•10 months agoI use Linux for years and still Google every time I have to use it!
darklamer ( @darklamer@lemmy.dbzer0.com ) 4•10 months agoWhy?
TheSaneWriter ( @TheSaneWriter@lemmy.thesanewriter.com ) English4•10 months agoFor me it’s because I don’t use it very often, mostly just archiving stuff every few months or so.
Gamey ( @Gamey@feddit.de ) 2•10 months agoYea, I use it from time to time but not very often and the syntax are as unintuitive as it gets (at least to my brain)
anteaters ( @anteaters@feddit.de ) 7•10 months agotar
is just the worst shell command in existence. Why do people still bother with it? PuppyOSAndCoffee ( @PuppyOSAndCoffee@lemmy.ml ) 6•10 months agoBecause it is faster to transport one big ass tar than 10k individual files, and compression is waste of time.
GiantRobotTRex ( @GiantRobotTRex@lemmy.sdf.org ) 3•10 months agoWhat do you use instead?
anteaters ( @anteaters@feddit.de ) 3•10 months agoI 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.
duncesplayed ( @duncesplayed@lemmy.one ) English7•10 months agoAre 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”? anteaters ( @anteaters@feddit.de ) 1•10 months ago7z 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.
aard ( @aard@kyu.de ) 6•10 months agoIf 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.
anteaters ( @anteaters@feddit.de ) English1•10 months ago100% 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.
PuppyOSAndCoffee ( @PuppyOSAndCoffee@lemmy.ml ) 2•10 months agoYou do you. Compression is waste of time; storage is cheap in that you can get more, but time? Time, you never get back.
russjr08 ( @russjr08@outpost.zeuslink.net ) English5•10 months agoYes, 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.
PuppyOSAndCoffee ( @PuppyOSAndCoffee@lemmy.ml ) 1•10 months agoTar achieves the same effect without time to compress and decompress.
TimeSquirrel ( @TimeSquirrel@kbin.social ) 2•10 months agoBecause 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.
anteaters ( @anteaters@feddit.de ) 1•10 months agoFor all I care it goes on the same garbage dump as LaTeX.
Baut [she/her] auf. ( @BautAufWasEuchAufbaut@lemmy.blahaj.zone ) 5•10 months agoI 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. anteaters ( @anteaters@feddit.de ) 1•10 months agoI 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.
Kait Richardson ( @qirenni@mastodon.social ) 0•10 months ago@anteaters @sebastiancarlos a little knowledge really is a dangerous thing
arc ( @arc@lemm.ee ) 7•10 months agoI 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.
emptiestplace ( @emptiestplace@lemmy.ml ) 3•10 months agoPowerShell is so much worse.
arc ( @arc@lemm.ee ) 4•10 months agoPowershell 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.
stilgar [he/him] ( @stilgar@infosec.pub ) English3•10 months agoThese “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.
freijon ( @freijon@feddit.ch ) 6•10 months agoJust use Ouch!
SokathHisEyesOpen ( @Anticorp@lemmy.ml ) English6•10 months agoWhat is “listing”?
peppy ( @peppy@lemmy.ml ) 11•10 months agolists the files in the archive. So you don’t need to extract the entire archive. Useful for huge archives.
SokathHisEyesOpen ( @Anticorp@lemmy.ml ) English5•10 months agoThanks!