"Nooooooo! You just can't use another proooosssesss"
@juzujuzu45552 жыл бұрын
Don't use the cat unless you got the consent.
@TheMostTruth2 жыл бұрын
I am root. i need not consent.
@mjdxp56882 жыл бұрын
Never heard of the UUOC before. I feel like "wasting" a processor cycle isn't really a problem for a process that runs for less than half a second on modern computers, maybe on an ancient mainframe I suppose. Edit: You should talk about the GNU/Linux copypasta next.
@PauloConstantino1672 жыл бұрын
copypasta
@taidee2 жыл бұрын
true, our computers are so quick that most of these commands complete at a blink of eye.
@flow57182 жыл бұрын
I sort of get where the UUOC crowd is coming from - because it's bad practice, I routinely run into situations when checking logs on my server which are in the several GBs, it's much faster to use grep instead of cat and grep. And I feel guilty, because it's not the processor or RAM that are in short supply but IOPS.
@themisterchristie2 жыл бұрын
The wasting a process idea is an old hold over from the 1970s/1980s when computers were a lot less powerful and had way less memory and every process was precious.
@mjdxp56882 жыл бұрын
@@themisterchristie I had a feeling. Now that essentially everyone has supercomputers I don't think that things need to be optimized that much anymore.
@Noukkis2 жыл бұрын
Most of the time you can replace it with input redirection (e.g. "< .bashrc wc -l" instead of "cat .bashrc | wc -l") which could save you ever more characters. But I admit I myself often use cat out of habit
@miique2 жыл бұрын
if you do this you should probably add "set -o noclobber" to your shell config so that you don't overwrite important files if you type ">" instead by mistake
@dontask85852 жыл бұрын
@@miique Thanks for looking out
@mjdxp56882 жыл бұрын
Thank goodness, this keyboard has a limited amount of keystrokes until it artificially breaks, I need to save every keystroke I can get.
@glidersuzuki55722 жыл бұрын
Using cat make it faster for larger files.
@mgh76342 жыл бұрын
I do what I want when it feels good to do it.
@moos32 жыл бұрын
"there's a lot of useless bitching and moaning" Nailed it.
@christophejournoud27732 жыл бұрын
In a perfect world, you should first send a mail to the UUOC consortium and wait for an official validation before using cat.
@quarteratom2 жыл бұрын
echo cat | cat | cat
@axelmaurice20132 жыл бұрын
Well, running a 🐱 command with the 🐠 shell looks pretty dangerous to me 😆
@mj-lc9db2 жыл бұрын
Id remeber the last time i used CAT but idk man
@HarryJurtz2 жыл бұрын
Hey
@HarryJurtz2 жыл бұрын
You are first
@StaticSchematic2 жыл бұрын
Here's how you're supposed to get the number of packages on your system: pacman -Q | cat | wc -l Cats are known for their impeccable ability to fit into narrow spaces, including between pipes.
@ExpatZ2662 жыл бұрын
Well, they had a point when we were using 8086's and 4k of memory. Those days are long gone.
@1yaz2 жыл бұрын
I get your point but those days never existed. I'd expect at least 128K of DRAM on an 8086/8088 PC.
@eniojuniorschutt28282 жыл бұрын
The book "The Art of Unix Programming" by Eric Raymond is old, but contains interesting information. Among these pages one can find why the cat command is the way it is, according to the Unix philosophy.
@Sveto82 жыл бұрын
I just measured execution time od cat|wc vs wc on a 9000 lines file. The difference is 0.001s. I think people who really need speed probably know a better way of using processes, but for most people and today's computers piping is just fine...
@cherubin7th2 жыл бұрын
I always insert "multiplications with one" and "additions with zero" into my equations, to simulate the use in cat but in equations.
@Fertxunonimo2 жыл бұрын
You can use alt+. to use the last part of last command, that usually is the file name, and avoid cat
@davidr24212 жыл бұрын
Even in a script, it's not worth complaining over, most of the time. Firstly, there is a clarity and development reason to cat into pipe: If you've got a chain of pipes (as one often does), it improves readability to do everything as pipes (input | cmd1 | cmd2 | cmd3 | ..., VERSUS cmd1 input | cmd2 | cmd3 | ...) and the ability to swap out your commands as you please without messing around too much. If you want to pipe the input first into a different command before wc or whatever, that's less annoying if you were already using the cat-into-pipe pattern. Secondly, the efficiency is really unimportant, most of the time. If your operation is going to be in the inner loop of a large job, then worry about efficiency. Otherwise you can forget about it.
@ronnyheijdenberg77102 жыл бұрын
Exactly my opinion! Very good point.
@Luclecool1232 жыл бұрын
I agree with you; that beeing said you can just use vi mode and 0cw
@stephan65302 жыл бұрын
Instead of up arrow, you can use Alt+k so you would only need cw.
@denisdubochevalier28292 жыл бұрын
My two cents on this: in most tutorials and videos, use of cat is not UUOC, because it serves as a placeholder for other commands. Though when typing commands, one should avoid them and either pass the filename as a parameter for large files (to allow block search instead of line search in awk/grep/sed/...) Or use redirection operators () for small to medium files: the gain of time isn't much, but it helps learn them and take the habit to use them, and there are so much more useful in so many contexts than cat. For instance, if you want to decode some base64 string from your clipboard, you can just type `base64 -d
@NekoiNemo2 жыл бұрын
Well, at the very least i learned about "UUoC" today
@derekgoodwine75092 жыл бұрын
After using Linux for a lot of years it's clear to me that you can do the same thing in several different ways. This is the Opensuorce freedom spreading all over, that's the beauty of Linux! Stop hurting one another, we are Linux brothers not monks. Peace!!!
@Not-THAT-ChrisPratt2 жыл бұрын
Could not have said it better myself!
@xorsirenz2 жыл бұрын
i see you're also finally getting annoying with all these new linux users who copy/paste radical opinions even though they have no idea why they are saying this said "knowledge".. You lasted a lot longer than me. i started getting annoyed with those type of linux users 2 years ago.
@voiceofthetrue18492 жыл бұрын
😅
@kdemetter2 жыл бұрын
UBAMAUUOC I just fell down on the floor laughing
@djyotta2 жыл бұрын
UUOC is actually a pretty naive concept. Even in scripting, I always prefer reading from stdin over reading from file. Consider "cat ${infile} | prog1 args | ... | progN args > ${outfile}" this is way more elegant than "prog1 args ${file} | ... | progN args > ${output}" because the input file and the output file are at the beginning and end of the command respectively (as DT pointed out). Makes later refactoring easier also as any program in the chain should be able to easily be swapped out. Even shell redirection (arguably better than using cat) is not as elegant as you end up with the same issue: prog1 args < ${infile} | ... | progN args > ${outfile}. For scripting, I don't see any real issue with using cat. Unless there is some huge files involved and you want control over input buffering etc. But that sort of stuff shouldn't be in a shell script in any case. As for programs that do not read from stdin, I typically create a wrapper for them so they do, because input/output files as arguments are a pain: #!/bin/bash # wrap prog so that it can take input from stdin fifo=$(mktemp -u) # unsafe - but you get the point mkfifo ${fifo} prog -input ${fifo} & cat - >${fifo}
@JohnDoe-sz5jh2 жыл бұрын
That's the knee jerk reaction of those that proclaim through their response "look at me!" I think they have low self esteem.
@mgh76342 жыл бұрын
Probably just trolling or the typical linux community egoism from the usual crowd that think they're big-brain for using Arch (but not Gentoo).
@bogdanh6352 жыл бұрын
i use cat instead of < because it reminds me of cats and cheers me up
@TheKramak2 жыл бұрын
Solid argument 😎
@ChadsHobies2 жыл бұрын
My grampa used to say there is always more than one way to skin a cat. There are several ways to do the same thing or similar things on the cli. It's all a question of style when it comes down to it. I enjoy the methodology of the concepts you freely show us. I'm a Gentoo fan. I do lots of things differently than other people. We however have very similar styles. I absolutely hate moving the curser to the begining of the line. Yes you can add vim functionality to the cli and with a couple presses be at the beginning of a line. But I absolutely embrace the sys admin mantra of being idle as much as possible. Up arrow, backspace is faster than all of that other stuff. I got it the first time you did it. What I do not understand, is if they are such experts, why are they here? Why do they expend their precious life cycle moments imposing their style on everyone? If they are so much superior to something presented. Then why are they even here? I'll never understand vile high and mighty trolls. I ignore these knaves. They are of no consequence or value. They add nothing of value to a topic. Only needless drama.
@act.13.412 жыл бұрын
I will admit that I have useless cats running around the neighborhood, but the Cat command is quite useful.
@drghartnangamn2 жыл бұрын
Excuse me for giving a piece of advice here. Instead of using UP ARROW and piping, you can certainly use !$, which means "latest argument" or even !:N which means N-th argument, no need to use UP ARROW. The second thing should be mentioned is: you can use vi-mode in your command line, so you can edit the command line easily. You can use external editor such as vim to edit the command line: Ctrl-X,Ctrl-E (you can assign any key binding you like).
@ggkim65532 жыл бұрын
I feel the same way whenever you say something is better than the others.
@dave07832 жыл бұрын
I really enjoyed this rant bro. it brightened my morning lol thanks :)
@chrissaltmarsh67772 жыл бұрын
I use cat a lot (I've been doing it for > 40 years). I use it thus: cat > {temporary rubbish file}. Type in whatever drivel I want, ctrl-d. Then, later, wondering what the hell is there, I can type 'cat crap' which gives me a juvenile pleasure for which I will sacrifice some machine cycles. Also, it is short for 'concatenate'. So you can add to the crap with >>.
@josephbrandenburg43732 жыл бұрын
What if I use cat to concatenate text files ?
@SimGunther2 жыл бұрын
That's an acceptable (and preferred) use of cat :)
@StrikerEureka852 жыл бұрын
the only useless cat is the one lying on top of my computer case right now...
@jonnypeace28102 жыл бұрын
Wow, i never realised how frowned upon the cat command is..... 🤭
@gwgux2 жыл бұрын
lol, I never really thought about it. If cat really was as useless as they claim it to be, then why has it existed for decades and why hasn't it's capabilities changed? Methinks the developers and anybody who just needs to get stuff done on the CLI without a script know better. Right or wrong for the most efficient way to accomplish the task doesn't matter. When I'm on a server and I'm hammering away at the CLI without a script to interactively do something, it just needs to work. Let me know when a computer's CPU has a meltdown because someone did a UUOC on the CLI and maybe then you can make the argument. In 15-20 years of doing things directly on the CLI in Linux, not once have I ever seen it be an issue where I ran an inefficient string of commands (which happens a LOT in crunch time fixing something that's broke) take down a server for resource usage. Scripting, where the real heavy lifting gets done, that's where I'd never use cat and I don't know any Linux admins that use it in scripting either. Peak efficiency is for my scripts, interactive commands just need to work.
@AndersJackson2 жыл бұрын
cat(1) HAS use cases, like concat files togethere from command line to one file/stream on stdout.
@retrogameplus38382 жыл бұрын
One of the reasons I use cat in the way you do is because the program receiving the data doesn't know about the source of the data. For example, it won't overwrite or modify a file because it's receiving data from stdin instead of reading that file manually. It can be very useful if you aren't sure if a program will modify a files contents.
@user-ux2kk5vp7m2 жыл бұрын
Then use a redirection
@fcolecumberri2 жыл бұрын
The "useless use of cat" is only relevant if you are working with 1gb+ size files, if you are working with small files is esentially irrelevant to use cat or not use cat (even on scripting)
@stevo199912 жыл бұрын
This wouldn't have happened if you had used Dog instead.
@GeorgijTovarsen2 жыл бұрын
Cat: best program to write ISO to /dev/sdX
@mke76052 жыл бұрын
The thumbnail was a Useless Use Of Cat.
@kellingc2 жыл бұрын
what if you have two files you want to sort and get thr number of unique instances? somethung like cat jan.intake feb.intake | sort | wc -u Oh, and you don't need spaces around the pipes. I guess I had useless use of whitespace.
@1yaz2 жыл бұрын
Which command to use when reading a file is a bigger deal when your terminal is 9600 baud. Terminal emulator with unlimited scrollback? Not so much
@flow57182 жыл бұрын
DT's blazed af 🔥
@minux14342 жыл бұрын
Man... I hope you're ok, you look really sick, specially looking your eyes :'( . I know you said you're better but please, get the rest you need to get over. We'll still be waiting for your content!
@triplexinaz2 жыл бұрын
Well that's kinda rude...
@minux14342 жыл бұрын
@@triplexinaz I don't know why you say it's rude... I wrote this because I love his videos. He said days ago he was sick and I felt he wasn't really good when he did this video. That's why I'd like him to get better. What's exactly rude about that? Could you explain why wishing someone to get better is rude?
@SlideRSB2 жыл бұрын
Sometimes, I pipe the output of cat into cat.
@flatiron2352 жыл бұрын
Standard workflow: cat file_xyz Crap too big for the screen. Arrow up pipe into more or grep or whatever :)
@SlinkyD2 жыл бұрын
more is less.... useful.
@flatiron2352 жыл бұрын
@@SlinkyD not if used correctly. It is perfect, when used as a bad example in a comment on KZbin. 😉
@SlinkyD2 жыл бұрын
Sarcasm that's written, I forgot, forgive me: The "more" command is "less" useful. That's what I get for being a command line junky & using a GUI app. Imma bad nerd.
@flatiron2352 жыл бұрын
@@SlinkyD no worries. 👍
@darthcabs2 жыл бұрын
The inspectors of other people's processor cycles strike again
@NoxavRagu2 жыл бұрын
cat is what i use when i not want to go into nano, still the first in mind
@dontask85852 жыл бұрын
Cheers to that
@tsundoku57332 жыл бұрын
Useless use of KZbin comments is actually useless ;-)
@tero.kinnunen2 жыл бұрын
There are multiple ways to skin a cat (pun intended). UUOC award is probably the oldest joke of this kind I can remember. Myself thought is as mostly harmless, mildly amusing geeky joke. But point well taken, thanks for sharing! Maybe I'll change my position to "UUOC joke considered harmful".
@olivermeissner51982 жыл бұрын
DT, you're completely right and you know what you're talkin' about. Let's see what cat does: it opens a file and reads it's contents. What does wc do? Well, I guess it opens a file to read it's contents (and because in a linux system everything is a file, it doesn't really matter if it opens /dev/stdin or ~/.bashrc)... And finally lets answer the question what computers are there for... I guess they're here to turn electricity to heat while doing some work and not to turn electricity to heat while doing nothing... so... let them work!
@Zinnaca2 жыл бұрын
Rant -> Yes this is familiar. People screaming "uses too much cpu" or "uses too much ram". My cpu is almost never 99% utilized by anything that i do on cli so waisting copule of cycles here and there means nothing to me. The other thing is this "uses too much ram" in context of window managers/desktop environments. I DO NOT CARE if my system uses 2gigs of ram after boot, i still have 30 left so these arguments are pointless to me. And yes i know there are cases (especially embedded systems) that are memory starved but that is not ALL cases! End of Rant Good to see you feeling better again! Keep up the vids they are very fun and informative!
@klin1klinom2 жыл бұрын
UBAMAUUOC - that's almost racist.
@ianoconnor15152 жыл бұрын
press home and use delete the change the command at the start
@abdellatifdev2 жыл бұрын
I agree it not useless , I believe all the hype came from video about scripting, some people just like to focus on pointless things like as software engineer i seen worse that people fighting over the case of using four space or tab char in C language where tabbing is completely useless or even fight on which colorscheme is better, you know better, i trust what you do, your linux skills are great
@harminparra76782 жыл бұрын
I use the cat command a lot. Practical when you need to read a file content without making modifications
@mgh76342 жыл бұрын
...you can use cat incorrectly? How if it conveniently outputs what you need to get a job done? It's like complaining someone used CTRL + L when they didn't need to.
@petersilva0372 жыл бұрын
just clicked for the kitten picture... darn... cat >/dev/null.
@syscrashwashere2 жыл бұрын
Useless is as Useless does.
@send2gl2 жыл бұрын
I use cat to occasionally remind myself of an entry in a file. Can copy and paste too.
@bender20332 жыл бұрын
tac is cat backwards
@PetrosSharp2 жыл бұрын
I prefer bat, anyway. Especially this way: bat -p
@EdwinNoorlander2 жыл бұрын
humm, So UUOC = Useless use of comment
@KingZero692 жыл бұрын
why this man COPING so hard… 😂😂😂
@sumnerd692 жыл бұрын
Nice boomer rant in the... studio? kinda miss the green in this kind of videos regardless, very nice video DT!
@SalahElmousa5 ай бұрын
I never used Cat command in my terminal because I scared its going to bite me!
@SB-qm5wg2 жыл бұрын
and it's cousin zcat
@jackkeifer2 жыл бұрын
hahaha, nice - your reasons taught me a pretty cool technique... thanks!
@SlinkyD2 жыл бұрын
Most of the world's population can be attribute to UUOC. Play that Gucci Mane song. 🐈
@JMIK19912 жыл бұрын
Cat was integral part of my Festival script until I learned how to do it better. It is not that simple to replace.
@Thomas-rl8kw2 жыл бұрын
I've used cat to write iso's to flash drives
@lovely-shrubbery85782 жыл бұрын
If they're that worried about it, they should only use cat to concatenate files like it was intended.
@rbettsx2 жыл бұрын
I guess there's always !$ .. :D
@SimGunther2 жыл бұрын
With TempleOS, you don't need to worry about pipelines and cats because JIT compilation and single user address space ala C64 are king 🎉
@Not-THAT-ChrisPratt2 жыл бұрын
Amen! Preach it, Brother! Linux gives us the Freedom to use cat, aux, sed etc. If ppl want to restrict that, let them go back to proprietary software gulag!
@tailsorange28722 жыл бұрын
"CAT": MEOW.
@x0rn312 Жыл бұрын
Love the ending on this one
@tenj002 жыл бұрын
What the hell. I find the redundant use of the word "cat" in this video to be bloat and I remain now triggered!
@KaiKrakow2 жыл бұрын
Well, next time you could run `
@warmpondwater16102 жыл бұрын
UUOC - Useless Use Of Comment about Useless Use Of CAT.
@SlinkyD2 жыл бұрын
ditto
@code89862 жыл бұрын
I don't cat into grep, btw.
@N0zer02 жыл бұрын
Let me interject for a moment. What you are referring to as useless use of cat, is in fact, useless use of GNU/cat, or as I've recently taken to calling it, GNU plus cat. cat is not a command unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components as defined by POSIX. Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU cat which is widely used today is often called "cat", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.
@mikechappell41562 жыл бұрын
The use of cat is consistent whether it is GNU or from one of the BSDs or Solaris. 'cat' actually is a command. (If you check man pages you may find a few different flags - haven't checked in years. The implementation of cat is probably pretty similar if you aren't using any flags. [Issues may exist with binary files, attached ttys, etc.]) There is nothing wrong with using 'cat' unless you are really concerned with optimization. Clarity and ease of modifying code is important too. The only time you would usually refer to 'cat' as 'GNU cat' is if you were addressing GNU only bugs/features or flags only recognized by GNU utilities. GNU binutils usually are a superset of the BSD versions and if you avoid GNU only flags they are largely compatible. (Flags may differ.)
@Alex-je6od2 жыл бұрын
Yeah.. 25 year sysadmin here. I *ALWAYS* start at cat. it allows me to start transforming data in a clear way. cat xxx | grep blah | grep -v noblah | awk etc Now, you might say, "yOu dOnT nEEd cat! JuSt grep wItH tHe file name!" The point you're missing is if I want to remove that first grep later on, I then have to transform the whole command and refactor it (moving the file name to the second grep). With the design above I can remove / adjust any component and have the overall command still work. It saves development / brain time when you're filtering / transforming a bunch of data in weird and wonderful ways. tldr; use the tools you're presented with. There are not "extra cycles" running cat.
@Jenny_Digital7 күн бұрын
I use cat to combine two 16384 byte files into one 32768 byte file and then burn it to an EEPROM quite regularly… from a BASH script! Oh, and I’m happy about that as it just _works_ for me. Hey kids, does that trigger you? *Good!*
@cjdebeer45812 жыл бұрын
Your Videos are the best.
@blessed100122 жыл бұрын
how do we get hold of you for business inquiries
@CMG782 жыл бұрын
people online have this bad habit of correcting people over the dumbest trivial crap like they are trying to show off how smart they are. hint we don't care as we do not know you if some one is using cat in a way you think is wrong or any other trivial shit keep your opinion to yourself.
@samyt6812 жыл бұрын
Whats up with the audio in this video
@Inkrementalgeber2 жыл бұрын
You told me to wc -l .bashrc and cat .bashrc | wc -l and it gave my the same output of 113
@Andrath2 жыл бұрын
Any of my three cats might have a problem with this. ;)
@knutblaise94372 жыл бұрын
Instead of refuting UUOC claims consider 02:22 "what's crazy is these people crying useless use of cat they know I know better". Combining those commenting with UUOC claims along with your 02:22 statement would make a useful video. Create a video showing alternatives to using cat and consider if "for your videos" saving a few keystrokes (up arrowing vs simply typing in a new command) is worth the upfront time you save vs all the wasted cycles of contemplating the UUOC claims and eventually creating a 6:43 video on the topic. FWIW I love the up arrow and will continue to save keystrokes over cycles. Also please consider defining the super key as the MS Windows Key/Apple Command Key once per distro video and maybe make it funny like the description of your password.
@tjingboem54472 жыл бұрын
OT, but i see you have 3 display monitors. I'm running Linux Mint for years (thinking about moving to Manjaro) and a NVidia card. Should i put 2 Nvidia cards in my system to get 3 or 4 displays? Will that work?
@Lyunpaw2 жыл бұрын
I saw a meme on Reddit, Don't bash cat with pipe. Phunni!
@yyoonnii2200662 жыл бұрын
Great video with a good point
@daviddupoise64432 жыл бұрын
Ha ha ha! Nice one. Well deserved
@Chris-ip8uv2 жыл бұрын
Why do you bother giving credence to folks that push your buttons?
@LeeSmith-cf1vo2 жыл бұрын
I use cat in my scripts all the time. I'm sure that some 99% of those times it probably is "useless" But I really don't care. In the vast majority of cases the difference it makes is going to be negligable. Definitely a case of preumature optimisation there. It probably becomes more important if you are writing a script that will be run by other people and/or in an environment where specific resources (e.g. process count) are at a premium. But this is not most cases.