475
Tradional Usage
  tar {A|c|d|r|t|u|x}[GnSkUWOmpsMBiajJzZhPlRvwo] [ARG...]

It is invigorating.

top 50 comments
sorted by: hot top new old
[-] nil@piefed.ca 1 points 1 hour ago

tar xvf unzip -l unzip -d

[-] HamsterRage@lemmy.ca 1 points 28 minutes ago

That would work if it was find instead of tar.

[-] GottaHaveFaith@fedia.io 1 points 1 hour ago

of course I know it, it's tldr tar

[-] groucho@retrolemmy.com 3 points 15 minutes ago

Honestly I just create and extract. I don't use most of the options. But, I had a lead about ten years ago dare me to create and compress a .tar.gz directly without looking it up and I was most of the way through typing it by the time he finished talking. He looked at me like I was doing black magic.

[-] CryptoKitten@sh.itjust.works 1 points 2 hours ago

Tar used to be more complicated, some of the flags are not necessary anymore but I still create .tbz2 with cvjf and extract with xvzf.

[-] GeorgimusPrime@lemmy.world 3 points 5 hours ago
[-] esc@piefed.social 12 points 6 hours ago

It's pretty simple

tar
 e[x]tract
 [z]is
 [f]ile
 [v]erbosely
archive.tar.gz
--directory=archivedir

For creation it's pretty much the same but you need to specify [c]reate, e.g. tar czvf archive.tar.gz filestoarchive/ and for lis[t]ing it's - tar tf archive.tar.gz

[-] drhoopoe@lemmy.sdf.org 1 points 3 hours ago
[-] boonhet@sopuli.xyz 9 points 5 hours ago
tar
  [t]he
  [f]uck
am_i_looking_at.tar.gz
[-] HotsauceHurricane@lemmy.world 3 points 5 hours ago

Tar -xf doodoobutt.tar

it that simple.

[-] renormalizer@feddit.org 9 points 6 hours ago
[-] entwine@programming.dev 14 points 8 hours ago* (last edited 7 hours ago)

Tar (some versions at least?) is actually smart enough to detect which format to use based on file extension of the output, so you don't need to remember which flag corresponds to which compressor. Examples:

tar -caf archive.tar.xz [files]
tar -caf archive.tar.bz2 [files]

# extract
tar -xf archive.tar.xz
tar -xf archive.tar.bz2

So you really only need to remember that c means create, x means extract

[-] alecsargent@lemmy.zip 4 points 6 hours ago

Thanks for sharing this.

[-] negativenull@piefed.world 35 points 9 hours ago
[-] lena@gregtech.eu 31 points 9 hours ago
[-] pelya@lemmy.world 23 points 7 hours ago

tar is usually smart enough to figure that .tar.gz is a compressed archive, so tar xvf suffices.

Moreover, .tar.xz archives are much more common nowadays, and the flag to tell tar to use xz decompression is J. Yes, uppercase J I shit you not, because all other letters of alphabet were already taken. The next commandline option added to tar is going to be a Unicode emoji symbol.

[-] ruby@lemmy.dbzer0.com 3 points 3 hours ago

i always forgot about -J so i got used to writing tar --xz -cvf archive.tar.xz file1 file2… instead. it's a bit more explicit and i'll never have to hunt for the same flag in the man page again.

[-] schnoopy@awful.systems 7 points 5 hours ago

tar 🤏🗨️👉 archive files

[-] bobzrkr@sh.itjust.works 6 points 6 hours ago

The flag to extract .bz2 files is 'j'. Not confusing at all.

[-] pelya@lemmy.world 2 points 5 hours ago* (last edited 2 hours ago)

Burrows–Wheeler algorithm or block-compression algorithm, the bzip2 file compression program was developed by Julian Seward.

Ah yes, totally makes sense.

XZ Utils started as a Unix port of Igor Pavlov's LZMA (Lempel–Ziv–Markov) algorithm, by Lasse Collin, and then by the Tukaani Project.

So apparently the uppercase J stands for "that guy who made a better compression algorithm than Julian".

[-] akunohana@piefed.blahaj.zone 94 points 11 hours ago

Talk to me when you ffmpeg by heart 😭

[-] belluck@lemmy.blahaj.zone 3 points 1 hour ago

i wish i could get ffmpegged

[-] belluck@lemmy.blahaj.zone 2 points 1 hour ago

guy getting bred by two girls call that ffmpreg

[-] zackhow@programming.dev 1 points 37 minutes ago

I’m just glad that ffmpeg is smart enough when converting audio that all you need to do is pass the input and output.

[-] ImgurRefugee114@reddthat.com 5 points 5 hours ago* (last edited 5 hours ago)

I got it, mostly... The various filter chains, not so much. But I can map input streams and set dispositions and metadata, and know a bunch of svtav1 passthru params by heart; with enough experience to set pretty decent crf/preset/filmgrain-synth settings by eyeballing the input (ofc specifics depends on the video encoder and whether or not I'm using something like the psyex/hdr fork...)

Some people look at this as wizardry, but it's really not too hard once to get the hang of ordered arguments... Like whether or not you put -ss before or after -i changes the seeking behavior.... Okay, it's a little wizardry.

[-] akunohana@piefed.blahaj.zone 4 points 5 hours ago

You say

not too hard

I say

a4e2a0rCSRSNxUq.jpg

[-] Ephera@lemmy.ml 12 points 7 hours ago* (last edited 7 hours ago)

ffmpeg is always funny to me, because it feels like you could convert anything into anything, if you just knew the right flags, but 99% of my use is extracting a clip out of a video file.

And the command for that is in my shell history, so I wouldn't know the flags either. ¯\_(⊙_ʖ⊙)_/¯

[-] akunohana@piefed.blahaj.zone 10 points 7 hours ago

HAH! I know!!! The "correct" flags are always: Ctrl + r 'ffmpeg' an undefined amount of times 8D

[-] esc@piefed.social 3 points 6 hours ago

Ffmpeg is tough but you should strive to openssl.

[-] akunohana@piefed.blahaj.zone 2 points 4 hours ago

Let that be my next new year's resolution.

[-] silenium_dev@feddit.org 2 points 5 hours ago

I mean, I at least know the simple stuff like transcode (with hw accel), scaling and trimming by heart, but filters? Hell no

[-] akunohana@piefed.blahaj.zone 2 points 5 hours ago* (last edited 5 hours ago)

Same here. Except I have only learned how to encode with x264 for now, without hw accel because learning the (in my case) nvenc switches and options is a whole other chapter...

[-] dil@piefed.zip 2 points 6 hours ago

Lemmy got an Ai hate boner but this is the first thing zi ever really used it for that wasn't research. "Give me the corrct ffmpeg command for _ and explain every flag concisely."

[-] akunohana@piefed.blahaj.zone 1 points 4 hours ago

While I wouldn't use AI myself for ehtical, environmental and detrimental reasons, I also don't judge anybody that does. Just make sure to vet the information on your own too! 😊 What did you use ffmpeg for BTW?

[-] dil@piefed.zip 1 points 4 hours ago

It's very clutch in general when you need a smaller file size or different format.

[-] dil@piefed.zip 1 points 4 hours ago

Converting my blender videos to smaller sizes for tiktok/ig to avoid their compression. I eventually just started going for smaller 15second vids, don't usually have to compress and I'm not making money either way. Was pretty useful tho, I saved one command and would just swap the names of the files, used it on my iphone through A-shell quite a bit.

load more comments (18 replies)
[-] dasrael@lemmy.zip 2 points 6 hours ago

true and real

load more comments
view more: next ›
this post was submitted on 14 Nov 2026
475 points (99.0% liked)

linuxmemes

33427 readers
2023 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 3 years ago
    MODERATORS