Looks like you have a much more stronger and complicated password on your main machine there. Excellent video! I love these shell command videos. This one was really interesting. Thanks!
@jyvben15202 жыл бұрын
so you do "cat ./example_file.iso > /dev/sdb", it may be cleaner but is it faster (no blocksize set) ?
@Phydoux21122 жыл бұрын
@@jyvben1520 that sounds dangerous. I'd read up on mounting iso files with cat a bit more before trying that one. I wonder if tac would mount it in reverse order...
@motozappa2252 жыл бұрын
cat is also useful to write/burn isos to drives, so it's a more efficient and clean alternative to dd or the other gui utilities out there
@pleaseenteraname12152 жыл бұрын
so to do this I just cat out my iso to /dev/sd*? also why is dd not clean?
@xrafter2 жыл бұрын
@@pleaseenteraname1215 Because dd stands for "dirty delete".
@xrafter2 жыл бұрын
@@pleaseenteraname1215 But no, I don't think cat is a better alternative than dd. Read more about it here >>> [provide link]
@pleaseenteraname12152 жыл бұрын
@@xrafter Your link is invalid :(
@xrafter2 жыл бұрын
@@pleaseenteraname1215 Ok.
@reality-drift1222 жыл бұрын
You have been such a large help in my Linux endeavors!! Thank you!
@pleaseenteraname12152 жыл бұрын
I second this sentiment this small mundane commands give way to learning big ones.
@OldieBugger2 жыл бұрын
Tac & Tee sound quite like the little programs I've written for some specific use, often a single use. Or sometimes I've used them twice.
@CostaKazistov2 жыл бұрын
Top notch examples! More of these videos, please.
@spacebuffer2 жыл бұрын
Loving these videos!
@DistroTube2 жыл бұрын
More to come!
@pleaseenteraname12152 жыл бұрын
@@DistroTube Thank you so much keep this up this is very necessary for new users and I love how useful linux has been.
@nxzthelinuxguy51922 жыл бұрын
In love with your scripting tutorials
@Appalling682 жыл бұрын
Excellent tutorial, especially (at least for me) the "tee" part.
@maciejszostakiewicz68832 жыл бұрын
Hah LOL, fresh video from 20 sec ago!! Yeah!!
@DistroTube2 жыл бұрын
True first!
@jamboyman2 жыл бұрын
The tee content is missing a really cool addition that I've only needed once so far. Using process substitution you can split pipes to multiple commands (ksh/bash/zsh): Uname | tee >(cowsay) >(grep a) ... >(Command n) | grep b All the commands will be run with the same input Think you can do the same process substitution in fish by just doing: command 1 | tee (command 2) (command 3)
@pleaseenteraname12152 жыл бұрын
Thanktyou
@linuxdude57422 жыл бұрын
I have never heard of tac before your video
@dougtilaran34962 жыл бұрын
Wait until tpa......
@Handy-Handy2 жыл бұрын
thx man! the command tee I have used far too rarely :)
@MasterHigure2 жыл бұрын
You explained > and >>, but not |. Of the three, I would think that's the one that most needs explaining to beginners. Also, I didn't know command-line arguments really count as stdin, I thought that was only when programs ask for input while running (the way a newbie's second program after hello world, the one that echoes your name back at you, would typically work).
@DistroTube2 жыл бұрын
Yea, 'ls' wasn't a good example of what stdin is. I should have used something like 'cat < file' where cat takes stdin as an argument. Kinda ironic that I didn't use 'cat' as an example since this video was about 'cat'. ;)
@WildVoltorb2 жыл бұрын
Are you going to explain that or what
@MasterHigure2 жыл бұрын
@@WildVoltorb My understanding, after using it here and there for a decade and a half, but never actually diving deep into any kind of documentation or such, is as follows: When you run a program that stops and waits for input from you before it continues (often a yes / no confirmation, but also other things like games played in the terminal), that input comes into the program through stdin. Many common command line tools take input either in the form of command line arguments or from stdin. grep, for instance, can take a filename and search through that file for whatever pattern you're looking for, and print each such line it finds. Or it can take input from stdin and look through that in exactly the same way. The | symbol takes the stdout output from one program, and rather than printing it to the terminal it feeds it into the stdin input of another program. In such "piped" commands, cat is a typical sender program and grep is a typical receiver program (although in chained piped commands, it can do both roles, and act as a filter). In fact, "cat filename | grep pattern" is, as far as I can tell, equivalent to "grep pattern filename".
@jidun9478 Жыл бұрын
Thank you. Excellent tutorial.
@whiskeylinux2 жыл бұрын
Dude I never knew about tac, so much fun lol
@MarkusHobelsberger2 жыл бұрын
I actually had the very last problem recently. I just sledgehammered it with su, but the tee solution would have been much more elegant :)
@ДаниилВласенко-м7и Жыл бұрын
This is genius! I need more!
@michalbotor Жыл бұрын
sudo tee trick is really cool thx
@xrafter2 жыл бұрын
15:02 now open that file using vim or nano. You will see all of thaf weird "/003" escapes that got interepted by the shell.
@davidpetersonharvey2 жыл бұрын
I use tee within mysql to run reports for clients. It's very handy.
@xrafter2 жыл бұрын
Hello DT, in the cat example, are you sure the newfile.txt and bashrc are the same with order difference?
@agneaybnair95192 жыл бұрын
Hey DT, I feel that the classic "hello world" statement should be replaced by "Hi Mom!" Do you agree with me?
@kadensharpin21562 жыл бұрын
would "sudo -u root echo 1 > /proc/sys/kernal/sysrq" work as well?
@cuttlefishn.w.27052 жыл бұрын
md5sum or shasum to see if two files have exactly the same contents, without having to open up and read them individually. The hash should be the same between .bashrc and newfile.txt.
@staswisniewski41012 жыл бұрын
Quick question - will You put link/direct command to change color of cursor in terminal?
@mohamedalichabani67752 жыл бұрын
How do you get colors in you man pages tho ?
@ahahahabmbc10752 жыл бұрын
I think Zsh automatically colors man. For bash, you need to write a function. Quick web search will give you the answer
@DistroTube2 жыл бұрын
i use 'bat' for my manpager instead of 'less.' I've done a video about changing your manpager awhhile back.
@synen2 жыл бұрын
What are some examples where TAC is useful? Thank you.
@lukevideckis22602 жыл бұрын
Hey DT, do a video on the 'bat' command - a nice alternative to cat
@nxzthelinuxguy51922 жыл бұрын
He probably already did it in his rust programs video
@sotecluxan42212 жыл бұрын
@phanindratube10 Жыл бұрын
Tee rocks!
@paupereira12692 жыл бұрын
What widget do you use to get the kernel version?
@othernicksweretaken2 жыл бұрын
uname -r
@paupereira12692 жыл бұрын
@@othernicksweretaken yes i know the command but how can you put that in a widget?
@othernicksweretaken2 жыл бұрын
@@paupereira1269 I have never done widget development because I don't require a GUI or desktop. I can remember that some 25 years ago I scripted GUI / widget stuff in Tcl (tickle), and a little later in Perl::Tcl. But I have long forgotten what I did back then. I would suggest to read the docs and man/info pages of the respective API that you are using. They might have implemted the uname syscall of libc.
@oaw_manofnorse2 жыл бұрын
First of all, it has to be mentioned that the kind of redirection with file descriptors you show, only applies to those shells, who have mainly inherited from the Bourne shell, while other shells might have other notations for that. The other points: No, "cat 0
@Joanyan2 жыл бұрын
it's weird that people are using cat to print to standard output instead of using < followed by the filename
@DistroTube2 жыл бұрын
"< filename" is not a legit command in Bash, the default system on every Linux distro and almost always the default user shell. "< file" is also not a valid command in Fish. So....there's that.
@Joanyan2 жыл бұрын
@@DistroTube oh I see. I original found out about < in a luke smith video from 2019, and it worked as he said on zsh so I thought it was universal. after testing it in bash now I see that it's not a bash command
@Joanyan2 жыл бұрын
kzbin.info/www/bejne/bmOxc4CsrZupfLs here is the video(I put it in a separate comment since yt sometimes automatically removes comments with links in them)
@amerikraine34012 жыл бұрын
I remember when I was new and trying to read the inside of a file and the answer was "cat". Lol
@laughingvampire7555 Жыл бұрын
cat goes in pair with split
@SB-qm5wg2 жыл бұрын
I'll do anything to not have to use awk. I'll sacrifice a live chicken.
@AeriaVelocity2 жыл бұрын
Don't forget about eet
@kychemclass58502 жыл бұрын
>> for overwrite and > for append would have been much safer !!
@econ58872 жыл бұрын
For vim: sudoedit instead of tee
@livingcodex98782 жыл бұрын
おはようございます
@Vlad-19862 жыл бұрын
si
@ArtemPelenitsyn2 жыл бұрын
Your light is a bit off: some of the face is in shadow.
@tamoozbr2 жыл бұрын
Why do you have a terminal rickroll?
@DistroTube2 жыл бұрын
Why wouldn't I have a terminal rickroll?!
@tamoozbr2 жыл бұрын
@@DistroTube you're right
@KangJangkrik2 жыл бұрын
Try this command cat $(which cat)
@ShaunakHub2 жыл бұрын
tac should have been named dog... Linux devs have no sense of humour!
@piadas8045 ай бұрын
Those are GNU commands, not Linux commands.
@Soliprem2 жыл бұрын
tsk, tsk. The most basic use of cat is the "Useless use of Cat"
@jangofett1322 жыл бұрын
frist
@dougtilaran34962 жыл бұрын
tac is arabic. TD HUBP
@thefossenjoyer33462 жыл бұрын
First!
@DistroTube2 жыл бұрын
Fake news!
@thefossenjoyer33462 жыл бұрын
@@DistroTube impossible.
@ebiscaia2 жыл бұрын
So if am I right "cat .bashrc && cat .bashrc > newfile.txt" == "cat .bashrc | tee newfile"?