model_tar_gz ,

I’m in this picture and I resent it.

qjkxbmwvz ,

When I'm feeling cool and downloading a *.tar* file, I'll wget to stdout, and tar from stdin. Archive gets extracted on the fly.

I have (successfully!) written an .iso to CD this way, too (pipe wget to cdrecord). Fun stuff.

Midnight1938 ,

Something like wget avc.com | tar xvf ?

user224 ,
@user224@lemmy.sdf.org avatar

Almost, I think.

wget -O - http://example.com/archive.tar | tar -xvf -
Midnight1938 ,

Didnt think this would ever work

uis ,
@uis@lemm.ee avatar

This is what we call UNIX-way

user224 ,
@user224@lemmy.sdf.org avatar

TAr stands for Tape Archive. Tapes store data sequentially. Downloads are done sequentially.

It's really just like a far away tape drive.

qjkxbmwvz ,

I usually suppress output of either wget (-q) or of tar (no v flag), otherwise I think the output gets mangled and looks funny (you see both download progress and files being extracted).

bloodfart ,

Good ol -xvjpf

smeg ,

.tar.gz, or .tgz if I'm in a hurry

lseif ,

...or shipping to MSDOS

eager_eagle ,
@eager_eagle@lemmy.world avatar

I use the command line every day, but can't be bothered with all the compression options of tar and company.

zip -r thing.zip things/ and unzip thing.zip are temptingly more straightforward.

Need more compression? zip -r -9 thing.zip things/. Need a faster option? Use a smaller digit.

UniversalFlamingo ,
@UniversalFlamingo@lemmy.world avatar
tar czf thing.tgz things/
tar xzf thing.tgz
eager_eagle ,
@eager_eagle@lemmy.world avatar

yes, and you still need zhe mnemonics

brbposting ,

There’s gotta be a buncha tools that Clippy into the terminal to say “did you mean ____?” right? Including some new ones where they trained/fine-tuned a language model on man pages?

Interesting it’s not the most popular thing to use a GUI and use shortcuts for everything you want to do while still having the option to click through a menu or wizard for whatever you haven’t memorized. I suppose the power and speed of the command line are difficult to match if you introduce anything else, and if you spend time using a user interface that’s time you can’t spend honing your command line skills.

user1234 ,

tar xf things.tar.gz/bz2/etc
Should be enough to extract. It can usually figure out the compression automatically.

nocteb ,

The problem with that is that it will not preserve flags and access rights.

janAkali ,

Zip is fine (I prefer 7z), until you want to preserve attributes like ownership and read/write/execute rights.

Some zip programs support saving unix attributes, other - do not. So when you download a zip file from the internet - it's always a gamble.
Tar + gzip/bz2/xz is more Linux-friendly in that regard.

Also, zip compresses each file separately and then collects all of them in one archive.
Tar collects all the files first, then you compress the tarball into an archive, which is more efficient and produces smaller size.

lseif ,

"yes i would love to tar -xvjpf my files"

-- statement dreamed up by the utterly insane

programmer_belch ,
@programmer_belch@lemmy.dbzer0.com avatar

Present, I'm the tar cvJf insane

_thebrain_ ,

That's fine. I'm use to being unrepresented in the arj, lha, and uc2 crew

pineapplelover ,

Where .7z at

TaintPuncher ,

.7z gang, represent

BaroqueInMind ,

Small dick package kings/queens rise up.

nexussapphire ,

When I was on windows I just used 7zip for everything. Multi core decompress is so much better than Microsoft's slow single core nonsense from the 90s.

youRFate ,

On windows.

user224 ,
@user224@lemmy.sdf.org avatar

7z is available for Linux as well (CLI only)

It is open-source too.

youRFate ,

I know, but I’d say ppl on Linux tend to not use it.

Lucidlethargy ,
@Lucidlethargy@sh.itjust.works avatar

Yeah, 7z is the clear winner.

sparkle ,
@sparkle@lemm.ee avatar

It's much slower to decompress than DEFLATE ZIP though

TimeNaan ,

What's wrong with .7z?

dustyData ,

Nothing, but I've read people who act as if tar files are some sort of alien artifact ready to rip their faces off.

Steamymoomilk ,
@Steamymoomilk@sh.itjust.works avatar

Make the stage 4 tarball

palordrolap ,

Bzip2 compression is often surprisingly good with text files, especially log files. It seems to "see" redundancies there - and logs often have a lot of it - far better than gzip and sometimes even lzma.

Anyway, if I saw a bunch of tar.bz2 files, that's what I'd expect to find in them.

boredsquirrel ,

.tar.xz

☠️

EddyBot ,
boredsquirrel ,

Yeah, Facebook!

Sucks but yes that tool is damn awesome.

Meta also works with CentOS Stream at their Hyperscale variant.

abbadon420 ,

Makes sense. There are actual programmers working at facebook. Programmers want good tools and functionality. They also just want to make good/cool/fun products. I mean, check out this interview with a programmer from pornhub. The poor dude still has to use jquery, but is passionate to make the best product they can, like everone in programming.

youRFate ,

Right, I usually do that or lz4.

Alexstarfire ,

You can't decrease something by more than 100% without going negative. I'm assuming this doesn't actually decompress files before you tell it to.

Does this actually decompress in 1/13th the time?

DmMacniel ,

how about .tar.zip or .tar.rar?

thejoker954 ,

I prefer .tar.rar.tar.

Ganbat ,

.tar.zip.tar.xz all the way

palordrolap ,

Kind of redundant. Both .zip and .rar store an index of files within the archive and are a bit 'inside-out' when it comes what we get from tar.gz.

That is, ZIP is pretty close to what you'd get if you first gzipped all your files and then put them into a .tar.

RAR does a little more (if I remember correctly), such as generating a dictionary of common redundancies between files and then uses that knowledge to compress the files individually, but better. Something akin to a .tar file is still the result though.

lemmyvore ,

Zip, RAR, 7z etc. store and compress the files. Tarballs work differently, tar stores the files and the second program compresses the tar as a continuous stream.

They originated in different mediums, programs like zip were born to deal with folder structures, tar was created to deal with linear tape archives (hence the name).

QuarterSwede ,
@QuarterSwede@lemmy.world avatar

TIL

MonkderDritte ,

.tar.xz

bjoern_tantau ,
@bjoern_tantau@swg-empire.de avatar

Yeah, it's similar enough to tar.gz to always confuse me.

palordrolap ,

wait until you learn about .tar.lz

Cenzorrll ,

Tar lzma nuts, amirite?

MonkderDritte ,

Good for image backups, after zeroing empty space.

stoy ,

xz is quite slow though

pelya ,

tar c file | pxz > file.tar.xz

uis ,
@uis@lemm.ee avatar

Same algo as in 7z

stoy ,

I had no idea about that!

MonkderDritte ,

pixz is in "extra" repo in arch. Same as pigz.

lurch ,

one of the cool things about tar is that it's hard link aware

  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • linuxmemes@lemmy.world
  • haupteingang
  • Alle Magazine