[No audio]
In this lesson, we're going to cover the directory
listing attributes. When you do ls within a
directory, so you cd into a directory and you do
ls, and you're going to only see the directories
inside, but when you do ls -l, or ltr,
other options within that ls command, you're
going to see different fields that's going to
output on your screen. The first field is the Type
of the file. So if any file that begins with d, it is
a directory, any file that begins with l, it's a
link, and any file that does not have anything on
it, it's just a regular file. So the first field
tells you about the Type. The second field tells
you about the number of Links it has, or hard links
that are attached to that directory. The third one, it
tells you, the Owner of the directory, who owns it.
The the fourth, the fourth one tells you the Group
of the directory, which group owns the directory,
and then the Size of the directory or file, the
Month, the Day, the Time, and the Name. So these
are the basic attributes when you do ls -l.
So let's go to our Linux server and see how it
looks in our Linux server.
[No audio]
Right click, Open Terminal. Okay. Which directory
are you in? Let's do pwd, and I am in my
directory. So let's go to slash home directory.
Sorry, slash, just slash directory, which is the
parent directory, and then we will do ls -l.
Here you will see the first again, the first
column right here tells you what type of file it
is. Second one, how many links, owner, group
owner, the size, the month, date, time, and the
name. So this is what you should need to know
whenever you're doing ls, because if you are trying
to do cd to a file, let's say we have this file,
testfile. If you do test, if you trying to get
into this file, it will tell you it's not a
directory because it's a file. That's how you
should know whether you are able to get into a
file or not. So if you go into let's say cd, slash
usr, there you go. You are in slash usr
directory because it's a directory. So that's how
you find out whether a file is a directory or link
or just a regular file.
[No audio]