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

It is invigorating.

all 88 comments

sorted by: hot top controversial new old
[–] 86 points 9 hours ago (27 children)

Talk to me when you ffmpeg by heart 😭

  • source
  • hideshow 27 child comments
  • [–] [S] 30 points 9 hours ago (6 children)

    Alright alright, I'll get you the moon you wanted.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 6 points 5 hours ago* (5 children)

    This comment got my brain stuck in an infinite loop: there's a rabbit on the Japanese moon, there are tons of moon themed jazz songs, the moon is cheeze, moonshine, moon rhymes with boon, Moon River is a beautiful song, Kame-sennin blew up the moon to make Son Goku revert to his human form, Moonraker was only "meh..."...

    I still don't get it. WHAT does this expression mean 😭

  • source
  • parent
  • hideshow 5 child comments
  • [–] 8 points 5 hours ago* (4 children)

    To β€œask for the moonβ€œ is to make an unreasonable request. The comment is a play on that saying. In this context, it means, β€œI’ll do the impossible”

  • source
  • parent
  • hideshow 4 child comments
  • [–] [S] 4 points 4 hours ago (2 children)

    Exactly this. It only occurred to me because, "Talk to me when […]" sounds exactly like a partner or significant other would say.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 14 points 8 hours ago (2 children)

    Not to mention imagemagick. I can often get ffmpeg to more or less do what I want on the first try, but imagemagick always results in a second try after reading the documentation for the 938th time.

    For the magick stuff I do all the time (you all know what it is) I prepared a script. I wrote it probably a couple of years ago by this point and even if you held a gun to my head and I had it open in the text editor in front of me I couldn't explain to you what all the flags and arguments actually do.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 11 points 5 hours ago* (last edited 5 hours ago) (1 child)

    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. Β―\_(βŠ™Κ–βŠ™)/Β―

  • source
  • parent
  • hideshow 1 child comment
  • [–] 8 points 8 hours ago (6 children)

    I just remember running the coolest ffmpeg command many years ago, I don't remember the actual command, but it rendered th video as ascii art

  • source
  • parent
  • hideshow 6 child comments
  • [–] 5 points 5 hours ago (1 child)

    Shut. Up. That sounds amazing. Did it convert the video data into ASCII text or did it use ASCII characters to resemble the actual video?

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 5 hours ago* (3 children)

    OK, I wanna know about the script. That sounds awesome.

    There’s a lot I could do with that

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 5 hours ago (2 children)

    Here you go, I think this is what you need, don't remember if it was what I used, but seem to be effectively identical:

    https://github.com/pzich/ffmpeg-ascii

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 3 hours ago* (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 4 hours ago (3 children)

    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."

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 2 hours ago (2 children)

    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?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 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.

  • source
  • parent
  • [–] 34 points 7 hours ago
    [–] 25 points 7 hours ago (4 children)
  • [–] 21 points 5 hours ago (3 children)

    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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 4 hours ago (1 child)

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

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 3 hours ago* (last edited 52 minutes 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".

  • source
  • parent
  • [–] 24 points 9 hours ago (3 children)

    I was going to use this opportunity to shill for tldr by linking directly to their page on tar.

    But I just realized tar's reputation is so bad, they use it as the example on tldr's homepage. πŸ˜‚

  • source
  • hideshow 3 child comments
  • [–] 19 points 9 hours ago* (11 children)

    Again this old myth that using tar is possible without looking up commands every time. It's been debunked many times

  • source
  • hideshow 11 child comments
  • [–] 22 points 8 hours ago (8 children)
  • [–] 13 points 8 hours ago (7 children)
  • [–] 17 points 8 hours ago (4 children)

    but how am i supposed to remember that?

    eXtract Ze Vucking File?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 4 points 6 hours ago* (last edited 5 hours ago)

    e[x]tract; g[z]ip; [v]erbose; [f]ile

    Reordered, and we can have [v]erbosely e[x]tract g[z]ip [f]ile, or tar vxzf [file]

    I find it more difficult to remember other options. Might stick better if pronouncing the g in gzip similarly as GNU insists GNU be pronounced, with a hard gβ€”never really tried it, but sounds a little funny. Actually, I think I first remembered it as g sounding like the, making for extract the zip file, but with a soft g; I felt the former put too much emphasis on a letter not used as an option.

  • source
  • parent
  • [–] 15 points 8 hours ago (4 children)

    I saw tar -xvf 13 years ago and have been using it ever since.

  • source
  • hideshow 4 child comments
  • [–] 2 points 5 hours ago

    Same. And if it's compressed you just add the appropriate shorthand in the letter soup somewhere in the middle:
    z for gzip j for bzip (for some reason)
    ..and I'm sure the other common algorithms have associated letters in tar. If not, pipe it

  • source
  • parent
  • [–] 14 points 8 hours ago

    for me it’s remembering whether I wanted addgroup or groupadd

  • source
  • [–] 12 points 6 hours ago* (1 child)

    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

  • source
  • hideshow 1 child comment
  • [–] 10 points 8 hours ago

    I once had a job where I used tar multiple times a day for years. I don't think I could forget how to use it if I wanted to, which I don't because I still use it.

  • source
  • [–] 9 points 4 hours ago (3 children)

    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

  • source
  • hideshow 3 child comments
  • [–] 7 points 8 hours ago (2 children)
  • [–] 7 points 7 hours ago

    tar -xvf all the things!

  • source
  • [–] 6 points 7 hours ago

    It's easy, you just have to remember the development was from Transylvania.

    EXtract Ze Vamn Files

  • source
  • [–] 5 points 7 hours ago (2 children)

    Why is everyone always going in about tar? I never saw the issue with it, its not more or less complicated than other commands that take command line flags...

    For example: sudo netstat -peanut, where -peanut actually expands to -p -e -a -n -u -t. I don't have any idea anymore what each letter stands for while I do recall that tar -cjf file.tar * is -c create, -j bzip2 compression and -f filename

  • source
  • hideshow 2 child comments
  • [–] 3 points 5 hours ago (1 child)

    Hah, I was taught to do netstat -tulpn. "Tulpen" is German for "tulips".

    Also, these days ss has generally replaced netstat (cause it's built into the kernel), so now I get to tell our trainees to run ss -tulpn.
    Every time, they think I'm bullshitting them, which is hilarious.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 7 hours ago

    zxf and zcf for me, I know what they do but not what it means. It's been like 30 years at this point

  • source
  • [–] 4 points 7 hours ago

    This is output on my setup (I frequently forget that I did this):

    $ tarhelp 
    
      helper definitions for tarcomp, untar, and tarls / tarlist:
      - tar[comp] -czvf archive.tar.gz file1 file2 dir1 file3
      - [un]tar -xvf archive.tar.gz
      - tar[ls|list] -tvf archive.tar.gz
    

    A clever helper, I think. If I remember to use it.

  • source
  • [–] 4 points 8 hours ago*

    I still remember moment when I accidentally swapped tar's arguments and it just overwrited my 20 Gib directory with empty tarball. (I had backups luckily.)

  • source
  • [–] 3 points 5 hours ago

    I can do that since 2005 when I installed gentoo for the first time.

  • source
  • [–] 3 points 3 hours ago
    [–] 2 points 4 hours ago

    true and real

  • source
  • [–] 2 points 9 hours ago

    Oh man so true

  • source
  • I only look at the tar manpage after xzf fails

  • source
  • [–] 2 points 8 hours ago

    Running a tar command without googling it.

  • source
  • [–] 2 points 6 hours ago

    rsync over ssh

  • source
  • [–] 3 points 6 hours ago* (3 children)

    more ~/.zsh_history | grep tar

    highlight

    copy

    paste

    move cursor to change file

    am i doing it right

  • source
  • hideshow 3 child comments
  • [–] 4 points 5 hours ago*

    You don't need more, you can just grep tar ~/.zsh_history

    If you only want the first ten results pipe to head.

    If you want more interactivity use less ~/.zsh_history Then press / to search. Press n for next match

  • source
  • parent
  • [–] 1 point 8 hours ago (1 child)

    tar is chill as fuck. Try messing with zip and unzip. Fuck zip.

  • source
  • hideshow 1 child comment
  • [–] 1 point 34 minutes 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.

  • source