4.1 Windows Basis

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *

Already have an account? Sign In »

5 hours 21 minutes
Video Transcription
Hello and welcome to command line basics. In this video, we're gonna go over basic Windows commands. I'm Christopher Hyler, and let's begin.
So are learning objectives for this video. We're gonna do a quick refresher on the Dura and CD commands. Learn the type command and the way you're going to clear the screen with see less clear screen commit.
All right. Pre assessment. Which command is used to read a text file on Windows? Is it a cat?
Be fined
sie dir or D type?
The answer is D type. This is a command very similar to cat on limits, where we're going to use it on a file, a text file, and it will spit it out to the screens who we can read it.
The cat Command does not work on Windows. That is a limits command. The fine command is used to search for things inside of a file, but it's not the best choice to read a full types file and the Dirk Man list along the items inside of a directory, not necessarily what those items contain,
Right, so a refresher on the Derby and CD command there, almost exactly the same as Lennox, the L S and CD Command. So the dirt tells everything that's inside of a directory. It gives us a really easy overview of exactly what is inside of this folder that we're working in, and we can take a look and see.
You know, When were these files last modified?
Who were they given ownership by how big the files are, You know, all sorts of really useful information, and then the CD command is almost the exact same as well in Lennox, where we change directory.
One thing to do keep in mind with Windows is we need the slash D switch. What we're using change directory
in order to change a drive within the Windows machine
and Windows is a little different than Lennox with the file hierarchy, where instead of having one single root with the slash as like with Lennox, Windows has different drives where we have to change a full drive if we're going to get into a different Dr.
So let's give you a quick demonstration of this. So I'm inside the D Dr text files, as you can see in the top left here. Now let's say I want to see what's inside of this folder.
Finance I. D. I. R
and hit Enter, and we can already see that we have a handful files in Hue of the batch file a few text files, another batch file. So a lot of really useful stuff. Now let's say I want to get to my C drive.
Then I'm going to do cg
slash d
C. Colon
and there we go. We're at the C drive, and now let's say I want to see what's inside of my C drive, so we're gonna do the same thing D I r
and enter, and we can see a whole bunch of folders that have wronged the root of my C drive
so we can also do the same CD and then change to a different folder. So let's say I want to go to Windows
and I just pushed the tab and it's useful. Keep in mind that Windows is not case sensitive at the command line, so you don't have to do a capital W for Windows that we would have to do for clinics.
We'll go in here and I could type d I. R. Again, and there's a lot of stuff in this folder, and then we can use the seedy space dot dot to go back up a folder directory exactly the same as Lennox
Arts of the type command. What this does is it allows us to read the contents of a file very similar to cat. And just like, Cat just spits out the entire file all at once. So if there's too much going on at once, we can pipe it into the more command, just like we did on Lennox.
This will allow us to start reading at the first line, and we can take our time going through line by line or page by page.
Now, by default, Windows does not have the less command. So as you go down a different lines, you cannot go back up. So that is a bit of a limitation. But you can download the less command unless execute herbal for windows if system you're going to do very often.
All right, so I'll go back to my command prompt, and we're gonna change back to the deed directory.
So I did seedy space. Forward slash d. D Cohen.
This brings us back into our last place on the D Dr
type there to see what is inside of this folder. And let's say I want to read what's inside file one that t X t
I'm gonna do type Final one
and hit Enter And there we go. This is the first text file here useful. So now we can see exactly what was inside of that file and it was easy.
But let's say we have a longer file, so I'm gonna do type longer, found up T X t.
And as you can see, our screen just exploded. We have a whole this activity and we couldn't see the start,
So I've had Thea pare aqui space
and more so it's gonna take the standard output from this tight command putting into the more command.
And now you can see in the bottom left here, said Maur. And this allows us to read starting at the first line at the top so we could take our time reading through the output instead of having everything come all at once. And then we can enter to go down in line or the space bar to go down a page. But
just like with more and Lennox, we cannot scroll back up.
All right, Now we have the clear screen command, the C l s for Windows. And what this does is it removes all the text on the screen, and it'll allow you to kind of refresh the command line. So this is a useful ways. You have too much coming on at once, and you just need a refocus on what you're doing. Just I've been seeing less
and you can start all over
just the same Miss Lennox.
So I'm gonna be back at my prompt. And let's say I don't like all these words. It's making me distracted. I don't know what I'm doing. So we're just gonna see s let me spell that properly enter and look at that. It's all refreshed. Brand new. I could start all over now to focus on what I'm doing.
So it's a useful way to kind of regain control if you feel like too much is going on on the problems at once.
All right. Post assessment. Which CD switch is used to change a drive? Is it a slash dr Be Sasha a c slash z where d slash d?
The answer is deep slash d This is the CD change directory. Switch the slash D for a drive in order to go to a different drive on windows.
The slash tries slash a and slashes, See are not valid options in order to change a drive with the CD command.
It's a video summary. We did a quick refresher on the during the CD commands. We've learned the type command and how it's very similar to the cat and, uh, you know, take that I would put in play, but into more if there's too much coming in at once, and we also learned how to clear the screen with seal us, and I hope to see you in the next video.
Up Next