Welcome back to this video.
So let's quickly see some more
Hardware system information commands that
are useful for us. All right.
So let's quickly begin with this command, which is
lsof.
Now when I type this command and hit enter it
is going to list all the open files
on my Linux system.
So when I hit enter you can see these are
all the list of open commands on to
my operating system.
Perfect.
Now if I want to specifically see
the files which are being opened by
a specific user. So for
that I need to type the command which is lsof space
- U and specify the
user. So let's say the user is root currently
and hit enter.
And you can see these are all the list of files
which has been opened by the user root.
You can specify any user
that you want that you are currently logged in.
All right. So the next command is free. Now
this command displays the
free and the used memory into
your computer. So let us type free and
hit enter.
And here you can see the memory, which is total.
Used free share cash
and available. Now these numbers
may look like something weird.
So to get the output in human
readable format. We're going to type the command free
hyphen H, which means the
output is going to be shown into
the human readable format.
Now this makes sense and we can see the total
memory given to this computer is 2.9 GB
out of which 701 MB
is used. It it MB is
free currently.
All right, if you want to see the output in
GB, you can just simply take free
hyphen G.
Hit enter you can see the output over here free hyphen
M and you can see the output similarly
like this. Alright.
Now if you want to see what is
the disk usage, you can simply type du
and hit enter and you will
be able to see the disk usage onto this computer.
Also, if you want to see the free disk space
this type DF and hit enter and
you will be able to see the disk space into this
computer.
Now in case you want to see periodic updates
of disk or memory for that,
you can simply type the command watch this DF
hyphen H
and human readable format and
here you can see every 2.0 seconds.
This command will show you
the periodic updates of what is
the disc into this computer. You can
simply come out of this by pressing Ctrl C.
You can also see
the
process usage by typing the command watch
top and hit enter. Alright,
let me just cancel this as well.
I hope you guys understood how you can execute a command and
you can also see the periodic updates for that
command that is happening in real time.
I hope you guys understood. Thank you.