Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet160/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   156   157   158   159   160   161   162   163   ...   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)

[
 114 
]
By default, 
grep
 is case-sensitive. This means that if we were to use 
grep
 to find lines 
matching "port" (with a lowercase P), we would get no output at all. We can simply 
add the 
-i
 argument to make the search case-insensitive.
It's very common to see the 
grep
 command paired with another command, such as 
cat
:
cat /etc/ssh/sshd_config | grep Port
That's a perfectly valid command, and will do the same thing. However, it's fairly 
redundant. We'll get into the concept of redirecting output in the next chapter, but 
essentially this command takes the output of the 
cat
 command and redirects it as 
input to the 
grep
 command. Using 
cat
 to first print out the file and then have 
grep
 
grab the contents of that file 
and search it for a string is a two-step process where 
only one step is required. But again, it's still a valid command. To this day, I'll 
personally use the 
cat
 command with 
grep
 to do the same thing out of habit, as this 
was how all new Linux users were taught back when I started. You'll even see me do 
this in my YouTube videos—old habits are hard to break!
Log files are a great source of information about what's going on in the background 
of your server, and are especially useful for troubleshooting. We'll now transition 
into a discussion on viewing these files and some relevant commands pertaining to 
logging.

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   156   157   158   159   160   161   162   163   ...   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