Time
5 hours 21 minutes
Difficulty
Beginner
CEU/CPE
6

Video Transcription

00:00
Hello and welcome to command line basics. This video, we're going over limits. Basics commands part one. I'm Christopher Handler. On this begin,
00:09
so are learning objectives for this video. We're gonna learn the Ellis Command learned the CD command and learned what PWD does. And these air very core critical parts of learning the linen shell and knowing your way around the clinic shell. So it's very important to know and be very comfortable with these commands.
00:27
All right, pre assessment. Which linens? Command displays the directories contents. Is it a dirt
00:33
B l S C content or de cat?
00:39
The answer is B. L s for list files. The dirt command that is the correct commander. Display directors contents on windows, not on Lenox. The content command is not a real command. And the cat command is to see what's inside. Will file, not thio. Display the contents of a directory.
00:59
So the Alice Command, it is usedto list the contents of a directory, as we just learned. And there's a few different special ways to use it. We have thea l switch the dash l and this gives everything in a listing format which will allow you to see the permissions and the dates that files from modified.
01:17
There's also the dash A switch as well.
01:19
And what this is used is it is used to show any hidden files and these air files on Lennox that start with a dot before the file name. So if you don't have this dash a in front over as one of the switches for the L s, then you won't be able to see a hidden file.
01:36
So let's go ahead and take a look.
01:38
All right, let me pull up my Lennox machine right now. So as you can see, I'm in my home folder desktop files. I'm gonna type l s and see what is inside of this directory.
01:49
And as you can see, we have ah few files in here.
01:53
And now let's say I want to see the permissions, so I'm gonna do l as space dash l and hit enter. And now we have our limits permissions, and we'll go over these a little bit in the future video. It'll show me who is the owner and the group owner of the file,
02:12
as well as the date that the file was modified so this could be very useful,
02:15
all right. And now I'm gonna push the up arrow key. That way, I have my l s or my previous command that it just entered. I'm gonna add a to it and see if there's any hidden files in this directory.
02:28
And it looks like there's not this dot and the dot dot are for Lennox to just show you what you know is inside of the directory. So let's go to my home folder.
02:38
And as you may or may not know, using the tilde for changing directory to the tilde That'll bring you to your home folder in Lenox. And now I'm going to use my up a rookie twice, So I don't look the type in this command again and hit Enter.
02:53
As you can see, I have a whole bunch of hidden files here
02:58
and now these air any files to start with the dot And if I just do in l s,
03:02
you'll see you don't see these hidden files with the dark in there. That's a good way to know if some files are hidden or not
03:10
and allow you to see all the files inside of directory so I like using Ellis Dash L a.
03:16
Alright CD. So we just went over this a little bit too. It's to change the directory, and this is how we navigate through the file system in on the show. And we can change it to any folder that, uh
03:30
is directly inside. And we don't have to give the absolute path the full past starting from the root of the file system.
03:38
Ah, and we can also do seedy space dot dot And what this does is it allows us to go up one directory directly instead of having thio, you know, type of full, absolute path of that directory.
03:50
So let's bring my lyrics machine back up. As you saw, we just changed to my home folder. Now let's say I want to get into my desktop folder from here, So gonna types C d all right, Space
04:05
and Capital D. Because, as you remember in Lenox, it is case sensitive,
04:12
and I don't have anything with a lower case D
04:14
and I'm gonna push tab
04:15
pushed, have twice, and I can see all of the available options.
04:19
So
04:21
type that out and then I will push tab for an auto complete and enter. And now I'm inside the desktop folder.
04:29
And if I type l s, I can see everything inside of this folder as well.
04:33
So this is very important so that you know how to get through files and go back between
04:41
all right, and we have the PWD. This stands for print working directory. Now, this is very important because you may be lost or don't know exactly where you are in the file system. So typing PWD will show you the entire directory listing the absolute file path of where you were working in the shell.
04:58
And it starts at the root of the file system in Lenox, which is always that slash.
05:02
And if you're not too familiar with Lennox, I'd recommend going over some of the limits plus videos in Cyber eri. But know that the Lenox file system always starts the slash as the absolute truth.
05:15
All right, I would see a demonstration. So as you can see, I'm already in my home folder slash desktop. But let's say I don't know exactly where my home folder is, So if I type Peter VD
05:27
and hit enter, you can see that we start at the root.
05:30
It goes into the home folder,
05:32
user and desktop.
05:34
So that's how you can know exactly where you are in the file system. If you think you might be lost, it's gonna be very helpful.
05:43
All right. Supposed to Cecil which l s which displays hidden files. Is it a dash A
05:49
B dash L C dash H or D Dash Dash hidden.
05:57
The answer is dash A. So this is how you can see all of the files inside of a directory, including the hidden ones, the dash analyst for the long listening So we could see everything. And the dash h and the dash dash hidden are not valid. Switches for Alice
06:15
aren't doing this video. We learned the L s command, learned the CD command and learn what feed every d does. And I hope to see you in the next video.

Up Next

Command Line Basics

In this course you will learn the fundamentals of Command Line, a fundamental tool for any user of Windows and Linux machines. Command line allows developers to manipulate files easily and quickly. Learning command line saves developers time and resources.

Instructed By

Instructor Profile Image
Christopher Haller
Senior Intelligence Operations Analyst at Centripetal
Instructor