this post was submitted on 06 Jun 2024
922 points (99.0% liked)

linuxmemes

19566 readers
2462 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 185 points 2 weeks ago* (last edited 2 weeks ago) (11 children)
[–] [email protected] 225 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

tar -h

Edit: wtf... It's actually tar -?. I'm so disappointed

[–] [email protected] 216 points 2 weeks ago (1 children)
[–] ekZepp 77 points 2 weeks ago* (last edited 2 weeks ago)
[–] [email protected] 105 points 2 weeks ago (2 children)
[–] [email protected] 27 points 2 weeks ago (2 children)

Me trying to decompress a .tar file

load more comments (2 replies)
[–] [email protected] 18 points 2 weeks ago (8 children)

You don't need the v, it just means verbose and lists the extracted files.

load more comments (8 replies)
[–] [email protected] 60 points 2 weeks ago (4 children)

tar -xzf

(read with German accent:) extract the files

[–] [email protected] 28 points 2 weeks ago

Ixtrekt ze feils

[–] ichbinjasokreativ 19 points 2 weeks ago (2 children)

German here and no shit - that is how I remember that since the first time someone made that comment

load more comments (2 replies)
load more comments (2 replies)
[–] [email protected] 21 points 2 weeks ago* (last edited 2 weeks ago)

tar -uhhhmmmfuckfuckfuck

load more comments (7 replies)
[–] [email protected] 95 points 2 weeks ago (6 children)

Zip makes different tradeoffs. Its compression is basically the same as gz, but you wouldn't know it from the file sizes.

Tar archives everything together, then compresses. The advantage is that there are more patterns available across all the files, so it can be compressed a lot more.

Zip compresses individual files, then archives. The individual files aren't going to be compressed as much because they aren't handling patterns between files. The advantages are that an error early in the file won't propagate to all the other files after it, and you can read a file in the middle without decompressing everything before it.

load more comments (6 replies)
[–] renzev 86 points 2 weeks ago (9 children)

Obligatory shilling for unar, I love that little fucker so much

  • Single command to handle uncompressing nearly all formats.
  • No obscure flags to remember, just unar <yourfile>
  • Makes sure output is always contained in a directory
  • Correctly handles weird japanese zip files with SHIFT-JIS filename encoding, even when standard unzip doesn't
[–] [email protected] 40 points 2 weeks ago (2 children)

gonna start lovingly referring to good software tools as “little fuckers”

load more comments (2 replies)
load more comments (8 replies)
[–] [email protected] 57 points 2 weeks ago (4 children)
[–] [email protected] 32 points 2 weeks ago (1 children)
[–] [email protected] 22 points 2 weeks ago (1 children)

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

It is open-source too.

load more comments (1 replies)
[–] [email protected] 25 points 2 weeks ago (2 children)
[–] [email protected] 15 points 2 weeks ago

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.

load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 46 points 2 weeks ago (13 children)
load more comments (13 replies)
[–] [email protected] 46 points 2 weeks ago (3 children)
[–] Alexstarfire 23 points 2 weeks ago

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?

[–] [email protected] 16 points 2 weeks ago (1 children)

Yeah, Facebook!

Sucks but yes that tool is damn awesome.

Meta also works with CentOS Stream at their Hyperscale variant.

[–] [email protected] 24 points 2 weeks ago

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.

load more comments (1 replies)
[–] [email protected] 38 points 2 weeks ago (6 children)

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.

load more comments (6 replies)
[–] [email protected] 36 points 2 weeks ago (1 children)

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

load more comments (1 replies)
[–] [email protected] 34 points 2 weeks ago (1 children)
load more comments (1 replies)
[–] Drummyralf 34 points 2 weeks ago* (last edited 2 weeks ago) (15 children)

Can someone explain why MacOS always seems to create _MACOSX folders in zips that we Linux/Windows users always delete anyway?

[–] [email protected] 19 points 2 weeks ago (5 children)

Window adds desktop.ini randomly too

load more comments (5 replies)
[–] [email protected] 16 points 2 weeks ago (2 children)

this is a complete uneducated guess from a relatively tech-illiterate guy, but could it contain mac-specific information about weird non-essential stuff like folder backgrounds and item placement on the no-grid view?

load more comments (2 replies)
load more comments (13 replies)
[–] [email protected] 21 points 2 weeks ago* (last edited 2 weeks ago)

I use .tar.gz in personal backups because it's built in, and because its the command I could get custom subdirectory exclusion to work on.

[–] cygon 21 points 2 weeks ago (4 children)

I'm the weird one in the room. I've been using 7z for the last 10-15 years and now .tar.zst, after finding out that ZStandard achieves higher compression than 7-Zip, even with 7-Zip in "best" mode, LZMA version 1, huge dictionary sizes and whatnot.

zstd --ultra -M99000 -22 files.tar -o files.tar.zst

load more comments (4 replies)
[–] shotgun_crab 21 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

.tar.7z gang (probably not a good idea)

load more comments (2 replies)
[–] [email protected] 21 points 2 weeks ago

.fitgirlrepack

[–] madscience 20 points 2 weeks ago

Mf’ers act like they forgot about zstandatd

[–] ordellrb 20 points 2 weeks ago (1 children)

Me removing the plastic case of a 2.5' sata ssd to make it physically smaller

load more comments (1 replies)
[–] devilish666 20 points 2 weeks ago

7z gang joined the chat.....

[–] 9point6 18 points 2 weeks ago* (last edited 2 weeks ago) (4 children)

I mean xz/7z has kind of been the way for at least a decade now

load more comments (4 replies)
[–] Emerald 17 points 2 weeks ago

Can we please just never use proprietary rar ever. We have 7z, tar.gz, and the classic zip

[–] bi_tux 17 points 2 weeks ago
[–] [email protected] 16 points 2 weeks ago

all the cool kids use .cab

[–] [email protected] 16 points 2 weeks ago (6 children)
load more comments (6 replies)
[–] eager_eagle 14 points 2 weeks ago* (last edited 2 weeks ago) (4 children)

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.

[–] [email protected] 20 points 2 weeks ago (1 children)

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

-- statement dreamed up by the utterly insane

load more comments (1 replies)
[–] [email protected] 15 points 2 weeks ago* (last edited 2 weeks ago)

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.

[–] UniversalFlamingo 14 points 2 weeks ago (4 children)
tar czf thing.tgz things/
tar xzf thing.tgz
load more comments (4 replies)
load more comments (1 replies)
load more comments
view more: next ›