5 hours 21 minutes
all right. Hello, And welcome to command on basics. This video we're gonna learn about Windows file commands one. I'm Christopher Hyler, and let's begin.
So are learning objectives for this video. We're gonna learn the echo command during the I cackles command and understand the FC file. Compare commend
pre assessment. The eye cackles command is he used to change file permissions. Is this true or false?
It is true. So the eye cackles Command is used to change the A C. L's or the access control list for a file or a folder. So this is very useful way in order to be able to change file permissions from the command line.
All right, we're gonna start off with the echo and we went over the Echo Command Ah, lot earlier in the environment variables session in that in that video. So this is still very useful command in orbit to combine with environment variables or when you're scripting Iran as well. Learn in this course
and we can get the output that we're looking for
so that we can take it and redirect it or make sure that it's coming out in the correct type of data for how we need to utilize it later. So it's a very useful tool that you need to be comfortable with in order to become effective at the command line.
It's very similar to the Lenox Echo as well, so we can just echo a message.
and it goes straight back to us. And then we can also echo environment variables as we've learned.
So let's say
and we could see it is Sunday, September 15 2019.
All right, so we have the eye cackles command as we learned a little bit already about in the pre assessment where it stands for integrity, control, access, control this. So this is a very useful way in order to change the file permissions at a remove violent Herron's whole bunch of very useful options for us at the command line.
And I will say that
being able to use the command line effectively,
it will save you a lot of time. Um, when I was a system administrator, I had the
the daunting task of taking about 2000 users,
and every single user had full control over every singles user's personal folder on the network, and so this was due to a network glitch where the power went out or we're transferring files or something crazy happened, although we had to do,
we had to go in and individually give full control to each individual user for each individual folded.
And that sounds pretty straightforward, except that's a lot of clicking to do for 2000 people. So what I did is I used the I cackles command and had it automatically look through each user name from the domain that had a folder
and had it automatically assigned inheritance and removed the full control permission for everybody else.
For that individual user. I let that run took about half a hour to run, and I was done completely done 100% accurately saved so much of my time and so much of the time for the rest of my team.
All right, so let's jump in and take a quick look at the eye cackles command.
So first I'm gonna do D I r. To see what's inside of this folder I'm working in.
Let's say I wanna look at file, too,
so I'm going to do I cackles file tab once and have again and then could see that he changed from find one to file, too.
And as you can see, there's a lot of inherited permissions already with the administrators systems, Thunder kid users built in users hope once you get stuff.
Now let's say you want to give myself access to, uh, this file and say I want to get myself full control over this file.
So I'm gonna do I'm gonna do my cackles file too
then my user name
and F for full control
and said it successfully processed it. So we will use up Eric, eat twice and look at the A Seal's again for this file
and check it out. Now I am a full control over this file.
It's very similar. If we look at the help for my cackles
you slash question Mark
and we could see we can also remove
different occurrences in the a c l weaken Grant deny Ah, whole bunch of interesting, different uses for I cackles. If you're not familiar with Windows permissions, I would highly recommend you take the time to learn them and how different inheritance and the deny inheritance works together because you can get very tricky.
So before you start going crazy on the,
you know, different A seals for files take the time to learn how the they all work together.
All right, now we have the FC file Compare command, and what is used for is to compare two files for differences, and we can use it to quickly find any changes between a file. One useful way of using this is for, ah, long file. For example, let's say that we have all sorts of different output, but we know that one maybe just slightly different than the other,
and used the F C Command to compare them together and see where those differences are.
So let's go into you, my command prompt type door again and let's do F C.
I'll compare and file one and filed two.
And look at that. This is the difference between these files. This is the first text file here,
and it said this is the second text file here, and if we had a longer files, he would have only spit out the strings that were different on each file. So this is a very useful way to look through and make sure if the's files or different or the same or not.
All right. So post assessment,
which command displays messages to the prompt, is it? Aye, aye, Cackles be eco, See? Cat or D F. C.
Answer is B echo. The Echo command will display any message to the trump that you type in. So it's a very useful way in order to validate different types of output. Or if you're trying to sanitize data for different different commands,
the eye cackles command is used to change a seals. As we've learned, the cat command is not for Windows. That is for the clinics to see the contents of a file. And the FC Command is used to compare files together not to display messages to the prompt.
All right, so in this video willing, the Echo command again lend the eye cackles command and how we can use it In order to change file permissions for file. We understood the FC Command to compare two files together for differences and I hope to see you in the next video