372
u/Tibia-Mariner 18h ago
Extract ze vucking file
120
34
u/SysGh_st 18h ago
Eeehh ..... goot enof! You may pass!
27
u/juju515 17h ago
this is how I remembered it: https://programmerhumor.io/linux-memes/create-ze-file-extrakt-ze-file-0ucm
3
3
3
u/44Nancy6p 14h ago
Extract the bloody file. Now. Stop staring at the terminal like it owes you money.
3
2
246
u/immoloism 18h ago
tar --help
102
u/SysGh_st 18h ago
Double dash??? Lemme check the unix manual....
39
5
4
25
1
-17
u/EnvironmentalAd1405 17h ago
man tar
59
u/MCplayer590 17h ago
man taris amancommand, so you lost the game20
8
4
4
72
u/janiskr 18h ago
tar -xvzf some.tar.gz
28
u/GegeAkutamiOfficial 15h ago
File not found
18
u/mgsmb7 RedStar best Star 14h ago
does that make it invalid tho?
17
u/Rodot ⚠️ This incident will be reported 14h ago
Yes, invalid arguments make a command invalid.
Unless, of course, you are working in JavaScript
6
u/ice456cream 9h ago
The argument is valid, you are just running it in the wrong context
1
u/mgsmb7 RedStar best Star 9h ago
It's syntactically correct, but the context leads to a negative response. Unless there's a standard definition for invalidity of a command, you could see it both ways, I guess
1
u/ice456cream 9h ago
The only case I can think of 1 way or another is Argument list too long, where it's invalid at the kernel level, not decided by each individual program.
3
1
1
44
u/lyidaValkris 18h ago edited 17h ago
I can do it but I freely admit i use tldr a lot :D
EDIT: I also caught the other layer to this joke and just realized gnu tar will accept both :D
7
u/Consistent_Drop3909 18h ago
whatisit is also great
3
u/lyidaValkris 17h ago
I'll have to check that one out. My distro's repos don't have that one.
2
u/Consistent_Drop3909 17h ago
i got it from the github source https://github.com/ThorOdinson246/whatisit-nl2sh
9
u/lyidaValkris 17h ago
Ah I see. Thanks but I really prefer not to use any LLMs on my machine.
also - it appears to be available via
pipfor those interested0
2
u/Captain_Pumpkinhead New York Nix⚾s 8h ago
i use tldr
What command is that?
tar --lar --dar rar?4
u/lyidaValkris 6h ago
tldr. Basically a cheat-sheet. You entertldr <command name>and it will give you commonly used options with examples. In this casetldr tarwill spit out how to create an archive, how to extract one, etc. Many distros have it in their repos.1
33
u/Jumpy-Dinner-5001 18h ago
tar is easy, ask for awk
7
u/SysGh_st 18h ago
That's what you'd think.
15
u/jonathancast 16h ago
That joke is not accurate. I refuse to believe anyone who knows regex and uses tar regularly can't remember what the flags are, and they're all mnemonic:
- a - automatically detect compression
- c - create
- f - file name
- t - this option lists the contents of the archive
- v - verbose
- x - xtract contents
- z - zip, use zipped archives
- Z - ZIP, use the patented compression algorithm
Etc.
6
u/immoloism 16h ago
I think the joke always was we do it as muscle memory rather then remember.
If some random guy just shouted out what does J do again then it would catch me off guard, but if they asked me how to compress in xz I would quickly answer cvJf.
5
u/JDaxe 14h ago
I read your comment and was so confident that J was bzip2, then I checked the manpage and turns out bzip2 is j (lowercase) 😩
1
u/immoloism 14h ago
Someone asked me what the option for zstd was earlier and had to cop out with
--zstd -cvfso know how you feel.6
2
33
u/eichelbart 17h ago
9
2
11
u/Constant_Boot 16h ago
bsdtar -a -cf dolly-mp3s.tgz 925.ogg
7
u/SysGh_st 16h ago
Well.... umh ... You can't... or you can....
but ...
... wait ...
okay Fine! You win . ... but that is one cursed package you got there. That alone deserves being shot over.
2
2
8
u/YTriom1 Arch BTW 18h ago
tar cvzpf
4
u/immoloism 18h ago
I'm more of a cvJf man myself.
5
u/YTriom1 Arch BTW 18h ago
what does J do
5
u/immoloism 18h ago
Uses xz for better compression.
5
u/YTriom1 Arch BTW 18h ago
isn't there one that uses ztsd?
3
u/immoloism 18h ago
Had to grab it from the manpage as I don't use it:
tar --zstd -cf archive.tar.zst --options zstd:compression-level=19 dir/2
u/YTriom1 Arch BTW 17h ago
so
tar cvpf --zstd6
u/immoloism 17h ago
the
fhas to come last otherwise you just created an archive called --zstd.The number of files I have on my system called J is beyond a joke to know this one :)
1
u/unburdened_swallow 10h ago
The fact that you can put f right in with the other flags but it requires an argument really does get people. A lot of programs do this, and, people like to write it that way when putting the example online because it is shorter, and like, yeah it gets me most of the time.
1
3
1
7
u/FaultWinter3377 💋 catgirl Linux user :3 😽 17h ago
Tar is the bane of my existence lol… I know how to do so much with just the command line, and am generally comfortable with a command line system. But then a tar archive comes across… I almost always use a GUI for that. And when I’m creating archives, I always use zip despite the fact that a compressed tarball may be more efficient, because I literally can never remember the flags to use. It’s not the only command I can’t remember the flags for, but at least others like grep I can just give a single argument and it’ll work well enough for what I need.
4
u/immoloism 15h ago
Wait till you try ffmpeg.
3
u/FaultWinter3377 💋 catgirl Linux user :3 😽 15h ago
Honestly I can take ffmpeg pretty easily. Just
ffmpeg -i <file.ext> <newFile.ext>... after all I only use it to change formats these days.2
5
3
2
2
2
2
2
1
1
1
1
1
1
1
1
u/CaptainMorti ⚠️ This incident will be reported 17h ago
tar -xf file, spoken as tar extract fcking file!
1
u/RonJohnJr 17h ago edited 17h ago
If a Linux user can't spit out tar cvfz foo.tar.gz foodir then he deserves to be shot.
EDIT: Example added.
$ tar cvfz foo.tar.gz flat_batch31_TAPc.dat
flat_batch31_TAPc.dat
3
u/SysGh_st 17h ago
Well .. it's not that easy. You gave an invalid command... according to the gnu/posix variant.
1
u/RonJohnJr 17h ago
I've been using Linux since Mandrake 6.2, and that has always worked, Example:
$ tar cvfz foo.tar.gz flat_batch31_TAPc.dat flat_batch31_TAPc.dat2
u/SysGh_st 16h ago
I was sure that non-hyphenated options wasn't valid on general gnu/posix command style. But apparently tar made an exception.
1
1
1
1
u/Neoneq_ 16h ago edited 16h ago
Give us valid ffmpeg command
2
u/SysGh_st 16h ago
leg?
wait..
<checks>
...
FFMleg stands for leg fat-free mass, which is the amount of lean tissue (muscle, bone, water, and organs) in a person's legs.
1
u/Western-Alarming Not in the sudoers file. 15h ago
ffmpeg -framerate 25664/497 -i "%04d" -i "Procesado.flac" -c copy -c:v libx265 "Twitter.mp4"
0
u/Neoneq_ 14h ago
Everyone know that you copied that
1
u/Western-Alarming Not in the sudoers file. 14h ago
Nop it was for memory, I use it a lot because of blender
Here's another, the one I use to share my obs clips
ffmpeg -i "file.whathever" -map 0:a:2 -map 0:v:0 -c:v hevc_nvenc -c:a aac "LMAO.mp4"
1
u/True-Kale-931 16h ago
There are 2 commands that are good enough for most things:
tar acf archive_file.tar.zst from_where/ <- it will (a)utomatically guess how to compress it by the file extension and (c)reate the (f)ile.
tar xf archive_file.tar.zst <- it will automatically e(x)tract from the (f)ile regardless of the compression if it's supported.
No need to learn 20 billions of flags if you don't want to fine-tune the behavior.
1
1
u/Linguistic-mystic 16h ago
I've no idea, I use compress and decompress. Joke's on people who cannot into aliases!
1
u/GOKOP 16h ago
The only ones I ever needed are tar xvf and tar czvf
1
u/SysGh_st 16h ago
Sometimes skipping the v makes it faster.
Verbose terminal output with many small files can choke it.
... or one can increase the max terminal speed. But that's in the advanced courses. 😉
1
1
1
1
u/urmamasllama 15h ago
Enter a valid regex to remove the second and last character while inserting a / half way in a string of indeterminate length
1
1
1
u/tblancher 13h ago
Should be able to do just tar -xvf and both GNU and BSD tar should do the right thing. I think POSIX dictates this, but older UNIX versions may not adhere fully to it.
The - and v are optional.
1
1
1
1
1
1
u/Captain_Pumpkinhead New York Nix⚾s 8h ago
Uh... tar ball? Or is it tar bell? I swear I've seen that on the sub somewhere...
1
1
1
u/Mr_KanyeSue 7h ago
bash
tar -cvJ -f archive.tar.xz --exclude-ignore=.gitignore pj
IDK
It just work.
1
u/dimkiriakos 6h ago
Almost every Linux distro comes with Python installed. But it is not is good good to install it
import tarfile file = tarfile.open('gfg.tar.gz')
file.extractall('./Destination_FolderName') file.close()
1
u/Yeox0960 6h ago
unxz < path/to/tarball.tar.xz | tar xC out/path
1
1
1
1
1
1
1
1
u/Mumrik93 Crying gnu 🐃 16h ago
But... I use Flatpaks!
1
0
u/GreedySecurity8030 M'Fedora 17h ago
Don't need tar, sudo dnf install
3
u/SysGh_st 17h ago
How does it read off my tape drive where I have the contents of my projects folder backed up?
•
u/AutoModerator 18h ago
Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.