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 😭
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.
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. ¯\_(⊙_ʖ⊙)_/¯
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.
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.”
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?
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.
Shutter encoders fine, but ai only needs to make the command literally once and then its just modify file input , idk why you’re assuming ai runs more than once in this scenario
Made command once, then I just scrolled up in my history and reused it for the year I was into posting to my 2 fans on tiktok.
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…
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.
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.
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.
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
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
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
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.
Put them in a dedicated file, I find it easier to manage. You’ll need to modify bashrc or zshrc to link to the new file. Big plus, they now work with both. I don’t know if it can be done with fish.
Now my favorite tip for us brainless: start aliases with an easy to reach character you most likely wouldn’t use in a terminal. I use “é”, on a french keyboard.
é+tab: all my aliases
é+t+tab: I see “étarextract” (there it is), “étext-edit”, “étodo”
I don’t even need to remember aliases. I don’t need to remember anything!
Imathop out.
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.
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
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.
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.)
I don’t know what’s worse–the fact that after 15 years of using tar I still can’t keep the flags straight, or that after 15 years of technological advancement I’m still mucking with tar flags that were 15 years old when I started.
By the way, tar -h is not a valid command, the flag is related to symlinks. You will want to use -? or –help.
I’m confused, I’ve not found much difference between zips/tarballs/7zip files. I know there is a difference, but I like using the best tools.
pls pitch me on how zip should be banished
I just recreated my entire fs using tar as an intermediate after using the computer for months with bad RAM. Then it worked. I won’t lie, it felt good.
134 comments
log in to comment.
Talk to me when you
ffmpegby heart 😭Alright alright, I’ll get you the moon you wanted.
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 😭
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”
Exactly this. It only occurred to me because, “Talk to me when […]” sounds exactly like a partner or significant other would say.
So… Does this mean you did in fact learn to
ffmpegby heart to any extent? 🤣I actually did have to learn a little bit for some videos I had, but now it is all gone.
Yeah, because without understanding the meaning, you don’t realize that they’re being sarcastic.
Heh thanks! Never too late to learn! 😅
“Do ya want the Moon Mary? Ya know what, that’s what I’ll do. I’ll throw a big lasso up there around the moon and I’ll pull it down here for ya.”
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.
Ahahaha I feel you. My ffmpeg scripts are similar: they work, but GOD knows why. I should print the manual and read before bed.
Condolences on never sleeping again.
Or, perhaps, congratulations on falling asleep right away.
ffmpegis 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. ¯\_(⊙_ʖ⊙)_/¯
HAH! I know!!! The “correct” flags are always:
Ctrl + r 'ffmpeg'an undefined amount of times 8DI 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
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?
It was a very long time ago, I ran it on my Dell Latitude E5400 with a Core2Duo, just so you get an idea of the era we are talking about.
I recall it worked like this script:
github.com/pzich/ffmpeg-ascii
I remember testing it out with a Futurama episode.
OK, I wanna know about the script. That sounds awesome.
There’s a lot I could do with that
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:
github.com/pzich/ffmpeg-ascii
Eureka!
Thanks a bunch!
You are very welcome!
i wish i could get ffmpegged
guy getting bred by two girls call that ffmpreg
I was just wondering why that sounded dirty, then I saw your follow-up comment.
I never ffmpegged you for a pervert. 🤷♀️
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.
You say
I say
Ffmpeg is tough but you should strive to
openssl.Let that be my next new year’s resolution.
ffmpeg is still doable but if you manage to use imagemagik by heart, i’il crown you as earth’s king/queen
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.”
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?
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.
It’s very clutch in general when you need a smaller file size or different format.
there’s a thing for that that uses far less resources and provides better consistency, it’s called graphical user interfaces
Shutter encoders fine, but ai only needs to make the command literally once and then its just modify file input , idk why you’re assuming ai runs more than once in this scenario
Made command once, then I just scrolled up in my history and reused it for the year I was into posting to my 2 fans on tiktok.
if you are good enough to know which command history to use, then the man page is enough.
Why read through some regurgitated trash when there’s a proper documentation.
I am assuming ai will be used every time because it is how someone who relies on ai for this task would do
Whos reading through anything, it outputs one line for my needs, and it did it 2 years ago and I continue to use that one line lmao
“good enough” like any of this shit requires competence or being good at something
I mean, I at least know the simple stuff like transcode (with hw accel), scaling and trimming by heart, but filters? Hell no
Same here. Except I have only learned how to encode with
x264for now, without hw accel because learning the (in my case) nvenc switches and options is a whole other chapter…I’m just glad that ffmpeg is smart enough when converting audio that all you need to do is pass the input and output.
$ man ls
eXtract Ze Vucking File
taris usually smart enough to figure that.tar.gzis a compressed archive, sotar xvfsuffices.Moreover,
.tar.xzarchives are much more common nowadays, and the flag to telltarto usexzdecompression isJ. Yes, uppercaseJI shit you not, because all other letters of alphabet were already taken. The next commandline option added totaris going to be a Unicode emoji symbol.tar 🤏🗨️👉 archive files
The flag to extract .bz2 files is ‘j’. Not confusing at all.
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
Jstands for “that guy who made a better compression algorithm than Julian”.i always forgot about
-Jso i got used to writingtar --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.genius
Can’t they just fucking combine multiple letters to make words? 😭
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. 😂I was gonna say, my knowledge of tar and ffmpeg (and god knows how many other progs) is basically limited to what’s on tldr.
Homepage? That should totally be a Linux command alongside --help, and man.
It is; I use it all the time!
github.com/tldr-pages/tldr/wiki/Clients#console-c…
This pic shows perfectly that one only ever needs six flags, of which two are always used. So what remains to remember is ‘c’ or ‘x’ and ‘j’ or ‘z’.
Again this old myth that using
taris possible without looking up commands every time. It’s been debunked many timeseXtract Ze File
xzvf or nothing
but how am i supposed to remember that?
eXtract Ze Vucking File?
Ja mein freund.
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
gzipsimilarly 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.Opened the thread to write this. Of course it’s already there.
Honestly at this point, I remember zxvf and xvfj purely through muscle memory.
czvf?
I just do xzf. No point for verbose.
tf is in the file?
I can do it if what I want to do is to extract a .tar.gz or .tar.bz2. Anything else is a myth
Pretty sure tar is some quantum artifact that changes it’s parameters every time you need to use it.
for me it’s remembering whether I wanted
addgrouporgroupaddSysadmin here. I still fuck up on a regular basis.
It’s pretty simple
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.gzTar -xf doodoobutt.tar
it that simple.
v stands for “vocking”, tar -xzvf is the intended use
zis?
This, but with an accent
I saw tar -xvf 13 years ago and have been using it ever since.
I just use
tar xf(extract file). Not sure, if that would’ve already worked 13 years ago…Use “tvf” (or tvzf or tvJf) first to make sure the files are nested nicely and not about to splooge all over your home directory.
same. One of those commands I only ever see with a specific set of flags that makes me wonder why or how flags are even useful for most users
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
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:
So you really only need to remember that
cmeans create,xmeans extractThanks for sharing this.
No, programs could not be smart. Stop anthropomorphising them
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.
Wait until you manage to rsync correctly…
Unless you’re doing something really specific just use
-a.Well i’ll be damned learning just now thanks to you that it equals -rlptgoD (recursive, links, perms, times, group, owner, devices)
I’m one of the lucky 10000…
You have revealed yourself.
You didn’t read the man page.
It’s on the -a documentation!!
Heretic! Jk.
I only know this because a few years ago I was scripting with rsync and the first thing I did was read thru to see which flags I needed for my usage.
Well, that’s a RFTM reminder ;)
Or find with exec
imgs.xkcd.com/comics/tar.png
I mean…
tar -cf hello.tar
or tar --help
Relevant xkcd
If like me you have no memory, use aliases often.
Put them in a dedicated file, I find it easier to manage. You’ll need to modify bashrc or zshrc to link to the new file. Big plus, they now work with both. I don’t know if it can be done with fish.
Now my favorite tip for us brainless: start aliases with an easy to reach character you most likely wouldn’t use in a terminal. I use “é”, on a french keyboard.
é+tab: all my aliases
é+t+tab: I see “étarextract” (there it is), “étext-edit”, “étodo”
I don’t even need to remember aliases. I don’t need to remember anything!
Imathop out.
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.
tar -xvfall the things!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
Hah, I was taught to do
netstat -tulpn. “Tulpen” is German for “tulips”.Also, these days
sshas generally replacednetstat(cause it’s built into the kernel), so now I get to tell our trainees to runss -tulpn.Every time, they think I’m bullshitting them, which is hilarious.
I use
-ntulpabecause I was researching tulpas at around the same time when I was learning netstat and it stuck.It’s easy, you just have to remember the development was from Transylvania.
EXtract Ze Vamn Files
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.)This is output on my setup (I frequently forget that I did this):
A clever helper, I think. If I remember to use it.
Try ffmpeg command line options, and tar starts to look like a starter job.
I was going to reply with a joke about ffmpeg but it seems the full thread is mostly that.
tar x|c|t+v(f)(x)this is pretty much everything I’ve ever used.
Xtract ze vucking file
Create ze vucking file
of course I know it, it's
tldr tarzxf and zcf for me, I know what they do but not what it means. It’s been like 30 years at this point
Same but with math: en.wikipedia.org/wiki/The_Feeling_of_Power
Read here (PDF): archive.org/download/…/The Feeling of Power.pdf
What nobody posted the tar XKCD yet?
Title text:
By the way,
tar -his not a valid command, the flag is related to symlinks. You will want to use-?or–help.They have posted it twice already. Just use
ctrl + fxkcd, lol.Ohh they linked it, I see. Just scrolled for the pic and didn’t see it. *facepalm*
tar bomba
more ~/.zsh_history | grep tar
highlight
copy
paste
move cursor to change file
am i doing it right
You don’t need more, you can just
grep tar ~/.zsh_historyIf you only want the first ten results pipe to head.
If you want more interactivity use
less ~/.zsh_historyThen press / to search. Press n for next matchIf you use fzf you can just type “ctrl-r tar”
Press Ctrl-R then type “tar” and if it’s not the most recent one you want, then press ctrl-r again until you find the right one.
I can do that since 2005 when I installed gentoo for the first time.
That would work if it was find instead of tar.
Oh man so true
I only look at the tar manpage after xzf fails
Running a tar command without googling it.
rsync over ssh
true and real
tar is chill as fuck. Try messing with zip and unzip. Fuck zip.
I’m confused, I’ve not found much difference between zips/tarballs/7zip files. I know there is a difference, but I like using the best tools. pls pitch me on how zip should be banished
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.
tar xvf unzip -l unzip -d
I just recreated my entire fs using tar as an intermediate after using the computer for months with bad RAM. Then it worked. I won’t lie, it felt good.
My favourite part is how it makes fun of you for lacking decisiveness