Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet162/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   158   159   160   161   162   163   164   165   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 115 
]
The content of this file is going to have quite a few lines. This is the system log, 
which is used to view informational messages about what's going on in the 
background as Ubuntu runs on your server, and will show warnings and errors as 
well. If you run into a problem where something isn't working quite right, you may 
see output in the system log that will provide you with some sort of error you can 
look up in a search engine so you can try and find a resolution. For example, you 
can use 
grep
 to view any lines that contain the search term 
Network
 if you're having 
issues with your connection:
grep Network /var/log/syslog
That's just a hypothetical example, but it may show lines that are relevant. Adjust 
your search term to whatever you're interested in finding.
This is also a good time to introduce you to the 
head
 and 
tail
 commands. These 
commands will show the first ten or last ten lines of a file, respectively. This is useful 
for the 
/var/log/syslog
 file because again, that file is quite large, and you may 
only be interested in certain lines. You can also adjust the number of lines the 
head
 
and 
tail
 commands show with the 
-n
 option with a desired number of lines. For 
example, to view the last 
100
 lines of a file:
tail -n 100 /var/log/syslog
Perhaps even more useful, is the 
-f
 option:
tail -f /var/log/syslog
This allows you to follow (watch) a file in (almost) real time. With the 
-f 
option, the 
terminal will continue to display new lines in this file as they're appended, so you 
can monitor the log file as someone attempts to reproduce a problem, for example. 
You can press 
Ctrl 

c
 on your keyboard to break out of the follow mode and return 
back to the command prompt.
Of course, there are many more foundational commands and concepts that we can 
go over, but I think that this is enough for now. In the next chapter, we'll expand on 
this further. But for now, I recommend you practice all of the concepts in this chapter 
until you're familiar with them before we go on.


Navigating and Essential Commands

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   158   159   160   161   162   163   164   165   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish