<ゃ罎膣 Linuxラ膩

maya
篁ャLinux泣若 <ゃ罎膣ゃ荅宴

 

 

<ゃ罎膣

maya
ャ≪帥莢違cLinux篏紮鋎帥<ゃ罎膣≪膣剛

nao
<ゃ罎膣鐚

maya
サ篏<ゃ篆絖c鐚違<ゃ鐚c罎膣≪篏<ゃ筝綽荀絖遵冴<ゃc罎膣≪純

 

find 潟潟

maya
<ゃc蚊>散ф膣≪ find 潟潟篏帥

 

find 潟潟篏睡箴
find [] [罎膣∽>散]

 

maya
c鋎帥c帥ゃ[guest]с違ゃ潟帥若莎桁

 

[guest@localhost ~]$

 

maya
障/var筝log篁<ゃc茯帥鴻帥

 

1鐚find潟潟сlog<ゃc茯帥鴻

[guest@localhost ~]$ find /var -name log
/var/log

 

nao
/var筝сlog罎膣≪

maya
>散с絎筝眼сlog罎膣≪

nao
絎筝器

maya
箴違rsyslogmaillog<ゃlog茵腓冴

nao
茵腓冴鐚

maya
<帥c随<炊絖鐚篏帥c罎膣≪<帥c帥鴻膣剛т箴膣剛

 

1鐚find潟潟сlog<ゃc茯帥鴻

[guest@localhost ~]$ find /var -name *log
/var/lib/systemd/catalog
/var/lib/rsyslog
/var/log
鐚
鐚

 

maya
*<帥c帥

nao
罎膣≪号c茵腓冴腟違

maya
緇罎膣≪紮贋絲障ィ絅/罎膣≪Linux泣若鴻<ゃャ<潟罎膣≪с

nao
篏фィ絅鐚

maya
鐚わゃс篋罎膣≪Linux泣若篁篋莢激c<с筝絮ゃф膣≪鴻障

nao

maya
find潟潟<ゃс<ゃ絎拷贋井ャс罎膣≪сц潟ャ≪ц帥鴻帥

 

grep 潟潟

maya
罨< grep潟潟鴻筝荳罎膣≪絎絖帥遵冴с箴水潟潟<ゃ篏腆肴/var/log/messagesх∈茯帥罸莠篋cat潟潟ф宴腆肴

 

grep 潟潟篏睡箴
grep [絖] [罎膣√乗院<ゃ]

 

maya
障罸莠篋cat潟潟ф宴腆肴

 

1鐚cat潟潟с/var/log/messages腆肴鐚膊∞罔絎茵鐚

[root@localhost ~]# cat /var/log/messages
Feb  6 21:00:00 localhost ...
Feb  6 21:00:01 localhost ...
Feb  6 21:00:02 localhost ...
 :
 :
Mar 15 20:59:58 localhost ...
Mar 15 20:59:59 localhost ...
Mar 15 21:00:00 localhost ...

nao
脂≪鴻若絖茵腓冴ч筝篏c

maya
<ゃх劫ユ違遵冴帥3142100違遵冴帥

 

2鐚grep潟潟с/var/log/messages腆肴鐚膊∞罔絎茵鐚

[root@localhost ~]# grep "Mar 14 21:00" /var/log/messages
Mar 14 21:00:00 localhost ...
Mar 14 21:00:14 localhost ...
Mar 14 21:00:32 localhost ...

 

nao
Mar 14 21:00紮障<祉若吾茵腓冴

maya
grep潟潟<ゃ筝荳紊с綽荀絖帥遵冴篏帥

nao
箴水潟潟

maya
1ゃ号膣剛篋/etc腱糸ls -l潟潟絎茵

 

1鐚cd潟潟с/etc腱糸

[guest@localhost ~]$ cd /etc

 

2鐚ls -l潟潟с<ゃ筝荀с茵腓冴

[guest@localhost ~]$ ls -l
荐 1156
-rw-r--r--.  1 root root   5090 11  5  2016  DIR_COLORS
-rw-r--r--.  1 root root   5725 11  5  2016  DIR_COLORS.256color
-rw-r--r--.  1 root root   4669 11  5  2016  DIR_COLORS.lightbgcolor
鐚
鐚
drw-r--r--.  6 root root    100  3 13  23:58 yum
-rw-r--r--.  1 root root    970  8  6  2017  yum.conf
drw-r--r--.  2 root root   4069  3 14   0:15 yum.repos.d

 

maya
grep潟潟篏帥鴻堺ャ

 

2鐚ls -l潟潟с<ゃ筝荀с茵腓冴

[guest@localhost ~]$ ls -l | grep yum
drw-r--r--.  6 root root    100  3 13  23:58 yum
-rw-r--r--.  1 root root    970  8  6  2017  yum.conf
drw-r--r--.  2 root root   4069  3 14   0:15 yum.repos.d

 

maya
潟潟х脂≪鴻若障綽荀絖遵冴篏帥

nao
潟潟2ゅ

maya
鐔鐚ゃ鐚篏帥c篏сgrep潟潟ゃ腟水с鋎帥

nao
<ゃc罎膣≪絖罎膣≪箴水紊

maya
с篁障ャ

 

 

  • find 潟潟<ゃc蚊>散ф膣≪
  • grep 潟潟鴻筝荳罎膣≪絎絖帥遵冴

 

鐚鐚若祉鐚鐚