Hello and welcome to Command on
Basics. In this video, we're going
to learn about Windows File commands
one. I'm Christopher Haler.
And let's begin this
hour, learning objectives for this
video. We're going to learn the Echo
Command, the essentials command
and understand the F.C.
file. Compare command
pre assessment.
The command is used to
change file permissions.
Is this true or false?
It is true.
So the command is used
to change the vehicles or
the access control list for
a file or folder.
So this is a very useful way in
order to be able to change file
permissions from the command line.
It's going to start off with the
echo, and we went over the Echo
Command a lot earlier in
the Environment Variables
session in that in that video.
So this is still
a very useful command in order to
combine with environment variables
or when you're scripting later on,
as we'll 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.
And it's very similar to the Linux
Echo as well.
So we can just echo a message,
although there
and that 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 this Sunday,
September 15, 20, 19.
All right, so we have the skills
command, as we learned a little bit
already about in the pre assessment
where it stands for Integrity
Control, Access Control List.
So this is a very useful way in
order to change the file permissions
at a remove file, inherence a 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.
When I was a system administrator,
I had the
daunting task of taking
about two thousand users
and every single user had
full control over every
single user's personal folder
on the network.
And so this was due to a network
glitch where the power went out or
we were transferring files or
something crazy happened, although
we had to do so.
We had to go in and individually
give full control to each individual
user for each individual folder.
And that sounds pretty
straightforward.
And so that's a lot of clicking to
do for two thousand people.
So what I did is I used
the Icon Skills Command and had
it automatically loop through each
user name from the domain that had
a folder and had it automatically
assigned inheritance and remove
the full control permission for
everybody else for that individual
user.
I let that run, took about half an
hour to run and I was done,
completely done.
One hundred percent 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 skills command.
So first, I'm going to do are
to see what's inside of this folder
I'm working on.
So I want to look at file, too.
So I'm going to do my Callicles
file tab once and
time again and then can see that
a change from file one to file two.
And as you can see, there's a lot of
inherited permissions already with
the administrator systems
authenticated, users built in users.
Who wants the good stuff?
Now, let's say I want to give myself
access to
this file and say I want
to give myself full control over
this file.
So I'm going to do Ackles
file to
Grant then
my username and F
for full control.
And instead, it successfully
processed it.
So we will use up Eric twice
and look at the SEALs again for
this file and
check it out. Now, I am a
full control over this file
and it's very similar.
If we look at the help for Ackles
use questionmark
and we can see we can also
remove different
occurrences in the ACL.
We can grant deny
a whole bunch of interesting
different uses for Ackles.
And 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 Dinni inheritance works
together because it can get very
tricky.
So before you start going crazy on
the different ECLSS for files,
take the time to learn how the they
all work together.
All right. Now we have the FEC file
compare command and what
is used for us to compare to files
for differences.
And we can use it to quickly find
any changes between a file.
One useful way of using this is for
a log file.
For example, let's say that we
have all sorts of different output,
but we know that one may be just
slightly different than the other
and use the FEC command to compare
them together and see where those
differences are.
So let's go into
my command prompt and type Durgan
and let's do F.C.
files. Compare and file one
and file 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 longer files, it would
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
these files are different or the
same or not.
All right, so pose the question,
which command displays messages to
the prompt, is it A cackles,
B, echo, C
cat or D F.C.
answer is B, echo.
The Echo command will display any
message to the prompt that you type
in. So it's a very useful in order
to validate different types of
output or if you're trying to
sanitize data for different
different commands.
The Essentials Command is used to
change ECLSS.
As we've learned, the cat command is
not for Windows.
That is for Linux to
see the contents of a file.
And the command is used to compare
files together, not to display
messages to the prompt.
All right. So in this video, we in
the Echo Command, again, when the
IC cackles command and how we can
use it to change file permissions
for file.
We understood the command to compare
two files together for differences.
And I hope to see you in the next
video.