UNIX/Linux ϵͳ´ÅÅÌ ¿Õ¼ä¼à¿Ø ×Ô¶¯»¯½Å±¾ ʾÀý
UNIX/Linux ϵͳ´ÅÅÌ ¿Õ¼ä¼à¿Ø ×Ô¶¯»¯½Å±¾ ʾÀý
1. ·ÖÇø¼à¿Ø /root/disktab ÎļþʾÀý
2. checkdisk ½Å±¾³õʼ»¯²¿·Ö
3. checkdisk ½Å±¾·ÖÎö /root/disktab Îļþ²¿·Ö
4.ÖеĽű¾ÊµÏÖÁËʵʱ¼à¿Ø²¢¼ì²â·ÖÇø×´¿ö£¬Í¨¹ýÇ°Ãæ»ñµÃµÄÓû§¶¨ÒåµÄãÐÖµºÍ df ÃüÁîµÄÊä³ö½øÐбȽϣ¬Èç¹û df ÏÔʾµÄij¸ö·ÖÇøµÄ¿Õ¼äÕ¼Óó¬¹ýÁËÓû§¶¨ÒåµÄãÐÖµ£¬ÔòÖ´ÐÐÓû§¶¨ÒåµÄ²Ù×÷¡£
4. checkdisk ½Å±¾¸ù¾Ý·ÖÇø×´¿öÖ´ÐÐÏìÓ¦
5. ÏìÓ¦½Å±¾Ê¾Àý
ÒÔϽ«ÊÇÏêϸ½éÉÜ£º
ÔÚÏÂÃæµÄÄÚÈÝÖУ¬ÎÒÃǸø³öÁËÒ»¸ö¶Ô´ÅÅÌ·ÖÇøÊ£Óà¿Õ¼ä´óС½øÐÐ×Ô¶¯»¯¼à¿ØµÄʾÀý£¬Óû§¿É¸ù¾Ý×ÔÉíÐèÇ󣬶ÔʾÀý½Å±¾½øÐÐÐÞ¸ÄÒÔ´ïµ½Ìض¨µÄ¹ÜÀíÄ¿µÄ¡£
ÎÒÃǵÄ×Ô¶¯»¯´ÅÅÌ·ÖÇø¿Õ¼ä¼à¿Øϵͳ·ÖΪÈý¸ö²¿·Ö£¬ÓÉÈý¸öÎļþ /root/disktab£¬checkdisk ½Å±¾ºÍ /root/diskresp ʵÏÖ¡£/root/disktab Îļþ¶¨ÒåÁËÐèÒª¼à¿ØµÄ´ÅÅÌ·ÖÇø£¬±¨¾¯ãÐÖµºÍ´ïµ½ãÐÖµºóµÄ¶¯×÷¡£checkdisk ÔòʵÏÖÁËÕû¸ö¶ÔÓÚ´ÅÅÌ¿Õ¼äµÄ¼à¿Ø¹ý³Ì£¬¶ø /root/diskresp ÎļþΪÓû§×Ô¶¨ÒåµÄ´ÅÅÌ¿Õ¼ä´ïµ½ãÐÖµºóµÄÏìÓ¦½Å±¾¡£
¼à¿Ø½Å±¾½«±»Ìí¼Óµ½ crontab ÖУ¬ÕâÑù¾Í¿ÉÒÔʹ¼à¿ØÑ»·½øÐС£ÎÒÃǵĽű¾ÔÚ RedHatEL-Server 5.3£¨perl °æ±¾ 5.8.8)¡¢SLES 11£¨perl °æ±¾ 5.10.0) ºÍ AIX 5.3£¨perl °æ±¾ 5.8.2) ÉϲâÊÔͨ¹ý¡£
¶¨ÒåµÄ /root/disktab ÎļþÓµÓÐÏÂÃæµÄ¸ñʽ
·ÖÇøËù mount µÄĿ¼ ±¨¾¯ãÐÖµ ´ïµ½ãÐÖµºóµÄ¶¯×÷
1. ·ÖÇø¼à¿Ø /root/disktab ÎļþʾÀý
/ 80% /root/diskresp
/data 100G /root/diskresp
ÔÚÕâ¸öÎļþÖУ¬µÚÒ»Ðбíʾµ±”/”·ÖÇø¿Õ¼äÕ¼Óó¬¹ý 80% ʱ£¬ÔòÔËÐнű¾ /root/diskresp ½øÐÐÏìÓ¦£»µÚ¶þÐбíʾµ±”/data”·ÖÇøµÄ¿Õ¼äÕ¼Óó¬¹ý 100G ʱÔËÐнű¾ /root/diskresp ½øÐÐÏìÓ¦¡£ÎÒÃǵÄÎļþÔÊÐí±¨¾¯ãÐÖµÒÔ KB£¬MB£¬GB Ϊµ¥Î»£¬Ò²¿ÉÒÔÒ԰ٷֱȱíʾ¡£
½Å±¾ checkdisk Ö÷ÒªÍê³ÉµÄÈÎÎñÊÇ·ÖÎö /root/disktab Îļþ²¢ºÍµ±Ç°²é¿´´ÅÅÌ¿Õ¼äµÄÊä³ö½øÐбȽϣ¬¶ÔÓÚ¿Õ¼äÒì³£µÄ·ÖÇø²ÉÈ¡ÏàÓ¦µÄ´ëÊ©¡£½Å±¾ checkdisk µÄµÚÒ»²¿·ÖÏȽøÐÐÁ˳õʼ»¯£¬»ñµÃÁËҪʹÓõķÖÇø¼à¿Ø¶¨ÒåÎļþ£¬Ä¬ÈϵķÖÇø¼à¿Ø¶¨ÒåÎļþΪ /root/disktab£¬Ò²¿ÉÒÔͨ¹ý²ÎÊýÖ¸¶¨¸ÃÎļþµÄλÖá£
2. checkdisk ½Å±¾³õʼ»¯²¿·Ö
#!/usr/bin/perl
use strict;
my $DISKTABFILE = “/root/disktab”;
if ($ARGV[0] ne “”) {
$DISKTABFILE = $ARGV[0];
}
# ÒòΪ Linux ºÍ AIX µÄ df ÃüÁî¸ñʽÂÔÓв»Í¬£¬ËùÒÔÊ×ÏÈÅжÏÒ»ÏÂ
my $OS
Ïà¹ØÎĵµ£º
ÕâÁ½Ì죬¸ø×Ô¼ºµçÄÔŪÁË˫ϵͳ£¬³ýÁËÔÀ´µÄWindows 7ϵͳÍ⣬װÉÏÁËLinuxϵͳ£¬Ê¹Óõİ汾ÊÇUbuntu
£¨µã
»÷¿Éµ½ÏàÓ¦µÄÏÂÔØÒ³Ã棩¡£¿ªÊ¼ÎÒ×°µÄLinux°æ±¾ÊÇfedora9£¬¶ÔÓÚÒ»¸ö¸ù±¾Ã»½Ó´¥¹ýLinuxϵͳµÄÈ˶øÑÔ£¬Ê¹ÓÃfedora£¬¼òÖ±ÈÃÈ˱ÀÀ£¡£¸ü
±ÀÀ£µÄÊÇ£¬ÎÒÓõÄÓ¢Îİ档ûµÄ°ì·¨£¬ÓÖÖØÐÂÏÂÔØLinux£¬¿Ìµú¡£×°ÏµÍ³¡£×°ÏµÍ³µÄʱºò ......
¡¡¡¡»·¾³£ºCentOS 5.3 x86_64Ï£¬/dev/sdb1ΪÊý¾Ý·ÖÇø/data0£¬EXT3Îļþϵͳ¡£
¡¡¡¡Ç°Òò£ºÎóɾÁË/data0/tcsql/cankao/phpcws-1.5.0/httpcws.cppÎļþ¡£ÓÉÓÚÍüÁ˱¸·Ýhttpcws.cppÎļþ£¬ÖØпª·¢¹¤×÷Á¿½Ï´ó£¬Òò´ËÖ»Óлָ´¸ÃÎļþÒ»Ìõ·¿É×ß¡£
¡¡¡¡debugfsÃüÁîÕë¶ÔEXT2·ÖÇø»¹ÐУ¬µ«¶ÔEXT3·ÖÇø¾Í°ï²»ÉÏæÁË¡£Å¼È»·¢ÏÖµÄÒ»¿î¿ªÔ´Èí ......
ÍøÉÏÓкܶàµÄ×ÊÁÏ£¬²Î¿¼itput£¨http://space.itpub.net/471666/viewspace-215923£©µÄ¡£
OS : Redhat
DB : Oracle 10.2.0.4.0
1.ÐÞ¸Äjdk ÏÂÃæµÄ×ÖÌå¡£
[oracle@a ~]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@a ~]]$ mv font.properties font.properties_bak
[oracle@a ~]]$
[oracle@a ~]]$ cp font.properties.zh_CN.R ......
FreeBSDÊÇÒ»¸öÍêÕûµÄ²Ù×÷ϵͳ£¬°üº¬ÁË´Ó¿ª·¢¹¤¾ßµ½¸÷ÖÖ¸÷ÑùµÄÓ¦ÓóÌÐò¡£
Ä¿Ç°ÈËÃÇÈÏΪFreeBSDÔÚÎȶ¨ÐÔºÍÍøÂçÔË×÷ÉϵÄÐÔÄÜÒªÓÅÓÚLinux¡£
ËüÓÉÒ»¸öÈí¼þ¿ª·¢µÄºËÐÄÍŶÓÀ´Î¬»¤£¬Õû¸öÔʼ³ÌÐò´úÂë»áÓÐ×éÖ¯µØ½øÐиüУ¬ËùÒÔ³ÌÐò´úÂë±È½ÏÓÐÒ»ÖÂÐÔ¡£
ÓÉÓÚÈËÃǶÔFreeBSDµÄÈÏʶ±È½ÏÉÙ£¬Ê¹Ó÷¶Î§Ò²±È½ÏС£¬µ¼ÖÂÁËËüÔÚ¶ÔһЩвúÆ· ......
#find ... -exec rm {} \;
#find ... | xargs rm -rf
Á½Õ߶¼¿ÉÒÔ°ÑfindÃüÁî²éÕÒµ½µÄ½á¹ûɾ³ý£¬ÆäÇø±ð¼òµ¥µÄ˵ÊÇÇ°ÕßÊÇ°Ñfind·¢ÏֵĽá¹ûÒ»´ÎÐÔ´«¸øexecÑ¡ÏÕâÑùµ±ÎļþÊýÁ¿½Ï¶àµÄʱºò£¬¾Í¿ÉÄÜ»á³öÏÖ“²ÎÊýÌ«¶à”Ö®ÀàµÄ´íÎó£¬Ïà±È½Ï¶øÑÔ£¬ºóÕ߾ͿÉÒÔ±ÜÃâÕâ¸ö´íÎó£¬ÒòΪxargsÃüÁî»á·ÖÅú´ÎµÄ´¦Àí½á¹û¡£ÕâÑù¿´À´£ ......