Okay.
Now it's time to talk about file and command monitoring.
We already saw the tail command and we used the Dash five option to soar because by default it will
show the last ten lines.
Now dash five, it will show the last five lines.
Now using dash F option, this will open the file and we'll keep monitoring it.
So, for example, if you want to check for access logs, so var log Apache two and access.
By the way, I don't have Apache here or running.
For now, let's open it.
No problem.
So sys ctl status apache two.
You can see it is running.
So now let's bring the local IP like this.
Or actually let's use the curve command.
Whatever.
Follow me for now as TB and put this one as you can see.
You can see that.
Here it is.
Now, if I.
Again the var.
Look, you can see that we should have access here.
Don't look.
You can see that.
Here it is.
Okay, now press.
Enter.
Press enter.
Now let's.
From here, right click.
Split Terminal vertically.
Okay.
Now, here on the second one.
Let's use again the kill command.
So kill actually is just like using the browser.
It will, as you can see here, if I meant cal or C URL to transfer a URL.
So so to transfer data using specific protocol or to access specific and check a specific connection
to the website.
So can actually be 127.0.0.1, which is the localhost press enter.
You can see that we have another access.
So this is while using the dash f options, using the tid as you can see.
OC Now we have another command called Watch OC and this watch to see the number of files.
So you can see that for example, if I run this tail, but without using the dash of option like this,
I want to keep running it to check if there is a problem or not.
You can see are there any access or suspicious access?
Now, instead of doing that over and over, we can put before it the watch dash dn and boot one and
press enter.
This is to this will keep updated than one dash and which means the number number of seconds.
This will keep updating this command every one second.
So instead of typing it over and over, over and over, just watch dash and the number of is of seconds
is one and keep it as is it will keep open.
OC Now in our case for the tail, actually tail is better because tail is real time after all.
But the watch this is used with another scenario.
For example, you are writing to a file, you are doing some stuff, whatever.
OC Well, it depends on you what you prefer.
Use it as you want.