The OpenNET Project / Index page

[ ÎÏ×ÏÓÔÉ /+++ | ÆÏÒÕÍ | ÔÅÇÉ | ]

ëÁÔÁÌÏÇ ÄÏËÕÍÅÎÔÁÃÉÉ / òÁÚÄÅÌ "äÏËÕÍÅÎÔÁÃÉÑ ÄÌÑ Linux" / ïÇÌÁ×ÌÅÎÉÅ ÄÏËÕÍÅÎÔÁ
îÁÚÁÄ ïÇÌÁ×ÌÅÎÉÅ ÷ÐÅÒÅÄ

þÁÓÔØ VI ðÒÉÌÏÖÅÎÉÑ

÷ ÜÔÏÊ ÞÁÓÔÉ
ðÒÉÌÏÖÅÎÉÅ A óÏ×ÅÔÙ, ÒÅËÏÍÅÎÄÁÃÉÉ É ÚÁÄÁÞÉ ÁÄÍÉÎÉÓÔÒÉÒÏ×ÁÎÉÑ
ðÒÉÌÏÖÅÎÉÅ B Requests for Comments (RFC), Ó×ÑÚÁÎÎÙÅ Ó ÉÎÆÏÒÍÁÃÉÅÊ ÐÒÉ×ÅÄÅÎÎÏÊ × ËÎÉÇÅ.

ðÒÉÌÏÖÅÎÉÅ A óÏ×ÅÔÙ, ÒÅËÏÍÅÎÄÁÃÉÉ É ÚÁÄÁÞÉ ÁÄÍÉÎÉÓÔÒÉÒÏ×ÁÎÉÑ

îÅËÏÔÏÒÙÅ ÓÏ×ÅÔÙ × ÜÔÏÍ ÒÁÚÄÅÌÅ ÓÐÅÃÉÆÉÞÎÙ ÄÌÑ Linux ÓÉÓÔÅÍ.. âÏÌØÛÉÎÓÔ×Ï ÐÏÄÈÏÄÉÔ ÄÌÑ ×ÓÅÈ UNIX ÓÉÓÔÅÍ.

1.0 õÔÉÌÉÔÁ "du"

÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÕÔÉÌÉÔÕ "du" ÄÌÑ ÏÃÅÎËÉ ÄÉÓËÏ×ÏÇÏ ÐÒÏÓÔÒÁÎÓÔ×Á, ÚÁÎÉÍÁÅÍÏÇÏ ÆÁÊÌÁÍÉ. îÁÐÒÉÍÅÒ, ÞÔÏÂÙ ÏÐÒÅÄÅÌÉÔØ ÒÁÚÍÅÒ × ÍÅÇÁÂÁÊÔÁÈ ËÁÔÁÌÏÇÏ× "/var/log/" É "/home/" ÉÓÐÏÌØÚÕÊÔÅ ËÏÍÁÎÄÕ:

[root@deep /]# du -sh /var/log /home
3.5M /var/log 350M /home

úÁÐÏÍÎÉÔÅ, ÞÔÏ ×ÙÛÅÐÒÉ×ÅÄÅÎÎÁÑ ËÏÍÁÎÄÁ ÐÏËÁÖÅÔ ÔÅËÕÝÉÊ ÒÁÚÍÅÒ ×ÁÛÉÈ ÄÁÎÎÙÈ. óÅÊÞÁÓ, ÎÁÐÒÉÍÅÒ, ×Ù ÕÚÎÁÌÉ, ÞÔÏ "/home" ÚÁÎÉÍÁÅÔ 350M, ÔÅÐÅÒØ ×Ù ÍÏÖÅÔÅ ÐÅÒÅÊÔÉ ×ÎÕÔÒØ ÅÇÏ É ÏÐÒÅÄÅÌÉÔØ, ÇÄÅ ÒÁÓÐÏÌÏÖÅÎÙ ÓÁÍÙÅ ÂÏÌØÛÉÅ ÆÁÊÌÙ.

[root@deep /]# cd /home/
[root@deep /home]# du -sh *
343M     admin
11k      ftp
6.8M     httpd
12k      lost+found
6.0k     named
6.0k     smbclient
6.0k     test
8.0k     www

úáíåþáîéå. ÷Ù ÍÏÖÅÔÅ ÄÏÂÁ×ÉÔØ ÜÔÕ ËÏÍÁÎÄÕ × ×ÁÛ crontab, ÞÔÏÂÙ ÐÏÌÕÞÁÔØ ÏÔÞÅÔÙ Ï ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÄÉÓËÏ×ÏÇÏ ÐÒÏÓÔÒÁÎÓÔ×Á ÐÏ ÐÏÞÔÅ.

1.1 ðÏÉÓË ÍÁÒÛÒÕÔÁ ÐÏ ËÏÔÏÒÏÍÕ ÐÁËÅÔÙ ÐÅÒÅÓÙÌÁÀÔÓÑ Ó ×ÁÛÅÇÏ ËÏÍÐØÀÔÅÒÁ ÎÁ ÕÄÁÌÅÎÎÙÊ.

åÓÌÉ ×Ù ÈÏÔÉÔÅ ÎÁÊÔÉ ÍÁÒÛÒÕÔ ÐÏ ËÏÔÏÒÏÍÕ ÐÁËÅÔ ÓÌÅÄÕÅÔ ÍÅÖÄÅ ×ÁÛÉÍ É ÕÄÁÌÅÎÎÙÍ ËÏÍÐØÀÔÅÒÏÍ, ÐÒÏÓÔÏ ÉÓÐÏÌØÚÕÊÔÅ ÓÌÅÄÕÀÝÕÀ ËÏÍÁÎÄÕ:

[root@deep /]# traceroute www.redhat.com

traceroute to www.portal.redhat.com (206.132.41.202), 30 hops max, 38 byte packets
1   ppp005.108-253-207.mtl.mt.videotron.net (207.253.108.5) 98.584 ms 1519.806 ms 109.911 ms
2   fa5-1-0.rb02-piex.videotron.net (207.96.135.1) 149.888 ms 89.830 ms 109.914 ms
3   ia-tlpt-bb01-fec1.videotron.net (207.253.253.53) 149.896 ms 99.873 ms 139.930 ms
4   ia-cduc-bb02-ge2-0.videotron.net (207.253.253.61) 99.897 ms 169.863 ms 329.926 ms
5   if-4-1.core1.Montreal.Teleglobe.net (207.45.204.5) 409.895 ms 1469.882 ms 109.902 ms
6   if-1-1.core1.NewYork.Teleglobe.net (207.45.223.109) 189.920 ms 139.852 ms 109.939 ms
7   206.132.150.133 (206.132.150.133) 99.902 ms 99.724 ms 119.914 ms
8   pos1-0-2488M.wr2.CLE1.gblx.net (206.132.111.89) 189.899 ms 129.873 ms 129.934 ms
9   pos8-0-2488m.wr2.kcy1.globalcenter.net (206.132.111.82) 169.890 ms 179.884 ms 169.933 ms
10 206.132.114.77 (206.132.114.77) 199.890 ms 179.771 ms 169.928 ms
11 pos8-0-2488M.wr2.SFO1.gblx.net (206.132.110.110) 159.909 ms 199.959 ms 179.837 ms
12 pos1-0-2488M.cr1.SNV2.gblx.net (208.48.118.118) 179.885 ms 309.855 ms 299.937 ms
13 pos0-0-0-155M.hr2.SNV2.gblx.net (206.132.151.46) 329.905 ms 179.843 ms 169.936 ms
14 206.132.41.202 (206.132.41.202) 2229.906 ms 199.752 ms 309.927 ms

ÇÄÅ <www.redhat.com> ÉÍÑ ÉÌÉ ip ÁÄÒÅÓ ÕÄÁÌÅÎÎÏÇÏ ÈÏÓÔÁ.

1.2 ÷Ù×ÏÄÉÔØ ÎÁ ÜËÒÁÎ ÓËÏÌØËÏ ÒÁÚ ÏÂÒÁÝÁÌÉÓØ Ë ×ÁÛÅÍÕ ÷Å ÓÅÒ×ÅÒÕ:

þÔÏÂÙ ÂÙÓÔÒÏ ×Ù×ÅÓÔÉ ÞÉÓÌÏ ÏÂÒÁÝÅÎÉÊ Ë ×ÁÛÅÍÕ ×Å ÓÅÒ×ÅÒÕ ÉÓÐÏÌØÚÕÊÔÅ ÓÌÅÄÕÀÝÕÀ ËÏÍÁÎÄÕ:

[root@deep /]# grep "GET / HTTP" /var/log/httpd/access_log | wc -l
467

1.3 ïÄÎÏ×ÒÅÍÅÎÎÁÑ ÏÓÔÁÎÏ×ËÁ ÂÏÌØÛÉÎÓÔ×Á ÓÅÒ×ÉÓÏ×.

ëÁË root ×Ù ÍÏÖÅÔÅ ÏÓÔÁÎÏ×ÉÔØ ÎÅÓËÏÌØËÏ ÓÅÒ×ÉÓÏ× ÏÄÎÏ×ÒÅÍÅÎÎÏ ÓÌÅÄÕÀÝÅÊ ËÏÍÁÎÄÏÊ:

[root@deep /]# killall httpd smbd nmbd slapd named

÷ÙÛÅÐÒÉ×ÅÄÅÎÎÁÑ ËÏÍÁÎÄÁ ÏÓÔÁÎÏ×ÉÔ Apache ÓÅÒ×ÅÒ, Samba ÓÅÒ×ÉÓ, LDAP ÓÅÒ×ÅÒ É DNS ÓÅÒ×ÅÒ ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ.

1.4 èÏÔÉÔÅ ÞÔÏÂÙ Õ ×ÓÅÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÎÁ ×ÅÒÈÕ ÔÅÒÍÉÎÁÌÁ ×Ù×ÏÄÉÌÉÓØ ÞÁÓÙ?

òÅÄÁËÔÉÒÕÊÔÅ ÆÁÊÌ profile (vi /etc/profile) É ÄÏÂÁ×ØÔÅ ÓÌÅÄÕÀÝÕÀ ÓÔÒÏËÕ:

PROMPT_COMMAND='echo -ne "\0337\033[2;999r\033[1;1H\033[00;44m\033[K"`date`"\033[00m\0338"'

òÅÚÕÌØÔÁÔ ÂÕÄÅÔ ×ÙÇÌÑÄÅÔØ ÔÁË:



1.5 éÎÓÔÁÌÌÉÒÏ×ÁÎÁ ÌÉ "lsof" ÎÁ ×ÁÛÅÍ ÓÅÒ×ÅÒÅ?

åÓÌÉ ÎÅÔ, ÔÏ ÉÎÓÔÁÌÌÉÒÕÊÔÅ ÅÅ É ×ÙÐÏÌÎÉÔÅ ËÏÍÁÎÄÕ "lsof -i". ÷Ù ÄÏÌÖÎÙ ÐÏÌÕÞÉÔØ ÓÐÉÓÏË ÐÏÒÔÏ×, ËÏÔÏÒÙÅ ÏÔËÒÙÔÙ ÎÁ ×ÁÛÅÊ ÍÁÛÉÎÅ. ðÒÏÇÒÁÍÍÁ lsof ÐÏÌÅÚÎÁÑ ÕÔÉÌÉÔÁ, ËÏÔÏÒÁÑ ÇÏ×ÏÒÉÔ ËÁËÉÅ ÐÒÏÃÅÓÓÙ ÓÌÕÛÁÀÔ ÎÁ ËÁËÏÍ ÐÏÒÔÕ.

[root@deep /]# lsof -i
COMMAND     PID   USER  FD   TYPE  DEVICE SIZE NODE NAME
Inetd       344   root  4u   IPv4   327        TCP  *:ssh (LISTEN)
sendmail    389   root  4u   IPv4   387        TCP  *:smtp (LISTEN)
smbd        450   root  5u   IPv4   452        TCP  deep.openna.com:netbios-ssn (LISTEN)
nmbd        461   root  5u   IPv4   463        UDP  *:netbios-ns
nmbd        461   root  6u   IPv4   465        UDP  *:netbios-dgm
nmbd        461   root  8u   IPv4   468        UDP  deep.openna.com:netbios-ns
nmbd        461   root  9u   IPv4   470        UDP  deep.openna.com:netbios-dgm
named       2599  root  4u   IPv4   3095       UDP  *:32771
named       2599  root  20u  IPv4   3091       UDP  localhost.localdomain:domain
named       2599  root  21u  IPv4   3092       TCP  localhost.localdomain:domain (LISTEN)
named       2599  root  22u  IPv4   3093       UDP  deep.openna.com:domain
named       2599  root  23u  IPv4   3094       TCP  deep.openna.com:domain (LISTEN)


1.6 úÁÐÕÓË ËÏÍÁÎÄ ÎÁ ÕÄÁÌÅÎÎÏÍ ÓÅÒ×ÅÒÅ ÂÅÚ ÐÏÄËÌÀÞÅÎÉÑ Ë ÎÅÍÕ ÞÅÒÅÚ ÐÒÏÔÏËÏÌ ssh

ëÏÍÁÎÄÁ ssh ÔÁËÖÅ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄ ÎÁ ÕÄÁÌÅÎÎÏÊ ÓÉÓÔÅÍÅ ÂÅÚ ÐÏÄËÌÀÞÅÎÉÑ Ë ÎÅÊ. òÅÚÕÌØÔÁÔÙ ×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄÙ ×Ù×ÏÄÑÔÓÑ ÎÁ ÄÉÓÐÌÅÊ É ËÏÎÔÒÏÌØ ×ÏÚ×ÒÁÝÁÅÔÓÑ ÎÁ ÌÏËÁÌØÎÕÀ ÓÉÓÔÅÍÕ. úÄÅÓØ ÐÒÉ×ÅÄÅÎ ÐÒÉÍÅÒ, ËÏÔÏÒÙÊ ×Ù×ÏÄÉÔ ×ÓÅÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÐÏÄËÌÀÞÅÎÎÙÈ Ë ÓÉÓÔÅÍÅ.

[admin@deep /]$ ssh mail.openna.com who
[email protected]'s password:
root    tty1    Dec   2   14:45
admin   tty2    Dec   2   14:45
wahib   pts/0   Dec   2   11:38

1.7 úÁ×ÅÒÛÅÎÉÅ ÉÍÅÎÉ ÆÁÊÌÁ

ôÁÂÕÌÉÒÏ×ÁÎÉÅ ÏËÏÎÞÁÎÉÑ ÉÍÅÎÉ ÆÁÊÌÁ ÐÏÚ×ÏÌÑÅÔ ×ÁÍ ××ÏÄÉÔØ ÔÏÌØËÏ ÞÁÓÔØ ÉÍÅÎÉ. ÷×ÅÄÉÔÅ ÎÁÞÁÌÏ ÉÍÅÎÉ ÆÁÊÌÁ É ÎÁÖÍÉÔÅ [TAB], ÉÍÑ ÂÕÄÅÔ ÚÁ×ÅÒÛÅÎÏ ÚÁ ×ÁÓ. åÓÌÉ ÂÏÌØÛÅ ÞÅÍ ÏÄÉÎ ÆÁÊÌ ÉÌÉ ÐÒÏÇÒÁÍÍÁ ÐÏÄÈÏÄÑÔ, ÔÏ ÒÁÚÄÁÓÔÓÑ Ú×ÕËÏ×ÏÊ ÓÉÇÎÁÌ É ÚÁÔÅÍ ÐÏÓÌÅ ÐÏ×ÔÏÒÎÏÇÏ ÎÁÖÁÔÉÑ [TAB] ×Ù ÐÏÌÕÞÉÔÅ ÓÐÉÓÏË ÐÏÄÈÏÄÑÝÉÈ ÉÍÅÎ.

1.8 óÐÅÃÉÁÌØÎÙÅ ÓÉÍ×ÏÌÙ

÷Ù ÍÏÖÅÔÅ ÂÙÓÔÒÏ ×ÙÐÏÌÎÉÔØ ÚÁÄÁÞÉ, ËÏÔÏÒÙÅ ÍÙ ÞÁÓÔÏ ÄÅÌÁÅÔÅ, ÉÓÐÏÌØÚÕÑ "ÂÙÓÔÒÙÅ ËÌÁ×ÉÛÉ" - ÏÄÎÕ ÉÌÉ ÂÏÌØÛÅ ËÌÁ×ÉÛ, ÎÁÖÁÔÉÅ ËÏÔÏÒÙÈ ÎÁ ËÌÁ×ÉÁÔÕÒÅ ×ÙÐÏÌÎÑÅÔ ÚÁÄÁÞÕ. îÁÐÒÉÍÅÒ, ÓÐÅÃÉÁÌØÎÙÅ ÓÉÍ×ÏÌÙ ÍÏÇÕÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÙ × ×ÁÛÅÍ ËÏÍÁÎÄÎÏÊ ÏÂÏÌÏÞËÅ ÓÌÅÄÕÀÝÉÍ ÏÂÒÁÚÏÍ:

Control-d : åÓÌÉ ×Ù ÎÁÈÏÄÉÔÅÓØ × ËÏÍÁÎÄÎÏÍ ÉÎÔÅÒÐÒÅÔÁÔÏÒÅ É ÎÁÖÍÅÔÅ control- d, ÔÏ ×Ù ÏÔËÌÀÞÉÔÅÓØ ÏÔ ÓÉÓÔÅÍÙ (logged off).

Control-l: åÓÌÉ ×Ù ÎÁÈÏÄÉÔÅÓØ × ËÏÍÁÎÄÎÏÍ ÉÎÔÅÒÐÒÅÔÁÔÏÒÅ É ÎÁÖÍÅÔÅ control-l, ÔÏ ×Ù ÏÞÉÓÔÉÔÅ ÜËÒÁÎ.

? : üÔÏ ÇÒÕÐÐÏ×ÏÊ ÓÉÍ×ÏÌ. ïÎ ×ÙÓÔÕÐÁÅÔ ËÁË ÅÄÉÎÉÞÎÙÊ ÓÉÍ×ÏÌ. åÓÌÉ ×Ù ÚÁÄÁÄÉÔÅ × ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÅ ÞÔÏ-ÔÏ ÐÏÄÏÂÎÏÅ "m?b", ÔÏ Linux ÎÁÊÄÅÔ mob, mib, mub É ÌÀÂÙÅ ÄÒÕÇÉÅ ÂÕË×Ù/ÃÉÆÒÙ ÍÅÖÄÕ a-z, 0-9.

* : üÔÏÔ ÓÉÍ×ÏÌ ×ÙÓÔÕÐÁÅÔ ËÁË ÌÀÂÙÅ ÄÒÕÇÉÅ ÓÉÍ×ÏÌÙ. åÓÌÉ ×Ù ÚÁÄÁÄÉÔÅ "mi*", ÔÏ ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ "mit", mim, miiii, miya É ×ÓÅ ÄÒÕÇÉÅ ÓÌÏ×Á, ÎÁÞÉÎÁÀÝÉÅÓÑ Ó "mi". "m*l" ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ mill, mull, ml É ×ÓÅÍÕ, ÞÔÏ ÎÁÞÉÎÁÅÔÓÑ Ó "m" É ÚÁËÁÎÞÉ×ÁÅÔÓÑ ÎÁ "l".

[] - ïÐÒÅÄÅÌÑÅÔ ÄÉÁÐÁÚÏÎ. åÓÌÉ Ñ ÚÁÐÒÁÛÉ×ÁÀ m[o,u,i]m, ÔÏ Linux ÏÐÒÅÄÅÌÑÅÔ: mim, mum, mom, ÅÓÌÉ Ñ ÚÁÄÁÀ: m[a-d]m, ÔÏ ÜÔÏ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ: mam, mbm, mcm, mdm. óÉÍ×ÏÌÙ [], ? É * ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÀÔÓÑ ÐÒÉ ËÏÐÉÒÏ×ÁÎÉÉ, ÕÄÁÌÅÎÉÉ É ÐÒÏÓÍÏÔÒÅ ËÁÔÁÌÏÇÏ×.

úáíåþáîéå. ÷ Linux ×ÓÅ ÚÁ×ÉÓÉÔ ÏÔ ÒÅÇÉÓÔÒÁ ÓÉÍ×ÏÌÏ×. éÚ-ÚÁ ÜÔÏÇÏ "Bill" É "bill" ÜÔÏ ÎÅ ÏÄÎÏ É ÔÏÖÅ. üÔÏ ÐÏÚ×ÏÌÑÅÔ ÈÒÁÎÉÔØ × ÏÄÎÏ ÍÅÓÔÅ ÒÁÚÎÙÅ ÆÁÊÌÙ Ó ÉÍÅÎÁÍÉ "Bill" "bill" "bIll" "biLl" É Ô.Ä. ôÁË, ÐÒÉ ÒÁÂÏÔÅ Ó [], ×Ù ÄÏÌÖÎÙ ÏÐÒÅÄÅÌÉÔØ ÚÁÇÌÁ×ÎÙÅ ÂÕË×Ù ÅÓÌÉ × ÌÀÂÏÍ ÆÁÊÌÅ ÏÎÉ ÍÏÇÕÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ.


îÁÚÁÄ ïÇÌÁ×ÌÅÎÉÅ ÷ÐÅÒÅÄ



ðÁÒÔΣÒÙ:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
èÏÓÔÉÎÇ:

úÁËÌÁÄËÉ ÎÁ ÓÁÊÔÅ
ðÒÏÓÌÅÄÉÔØ ÚÁ ÓÔÒÁÎÉÃÅÊ
Created 1996-2024 by Maxim Chirkov
äÏÂÁ×ÉÔØ, ðÏÄÄÅÒÖÁÔØ, ÷ÅÂÍÁÓÔÅÒÕ