Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚLINUXÉÏʵÏÖ windows »ØÊÕÕ¾¹¦ÄܵĽű¾


ÓÉÓÚ¹«Ë¾ÀïµÄ±¸·ÝÈí¼þÊÇÿÌìÍíÉÏÖ´ÐÐÒ»´Î£¬Èç¹ûÔ±¹¤µ±Ì첻СÐÄɾ³ýÁËÎļþ£¬ÄÇÖ»Äܻظ´µ½×òÌìµÄ״̬£¬Èç¹ûÊÇÔ±¹¤½ñÌ컨ÁËÒ»Ìì²ÅдÍêµÄCODE£¬ÄǾÍû·¨»Ö¸´ ÁË£¬ÕâÑù¾ÍÔ±¹¤Ò»ÌìµÄ¹¤×÷¾Í°×¸ÉÁË£¬µ±È»Äã¿ÉÄÜ»á˵£¬Õâ¸öÔ±¹¤»î¸Ã£¬Ë­ÈÃËû²»Ð¡ÐÄÁË£¬µ«Êǵ±ÊÂÇé·¢ÉúÁËÖ®ºó£¬È˼ҾͻáÀ´ÕÒÄã½â¾öÁË£¬ËäÈ» ÄãÆ½³£¶ãÔÚ½ÇÂäÀïÌý¸è¡¢¿´µçÓ°ÍøÉÏ¿´ÃÀŮûÈ˹ܣ¬µ«Êǵ±ÕæÕýÓÐÁËÎÊÌâºóÈ˼ҵÚÒ»¸öÏëµ½µÄ»¹ÊÇÄ㣬 Õâ¸öʱºòÄã×ܲ»ÄܸúÈ˼ÒÄã²»»á°É£¬Õâ¿ÉÊÇÌåÏÖÄã¼¼ÊõˮƽµÄʱºò£¬ºÇºÇ£¬ÄãÊÇÕâЩstupid µÄ¼¼ÊõÈËÔ±µÄ×îºó¾ÈÃüµ¾²Ýѽ……£¬ÄǾͰÑÎļþ¸øËû»Ö¸´»ØÀ´£¬°ÑÏÂÃæµÄ½Å±¾°²×°µ½ÄãµÄ LinuxϵͳÉϾͺÃÁË£¬ºÇºÇ£¬Solaris ºÍAIX»¹ÓÐÆäËüUNIX²»ÖªµÀºÃ²»ºÃʹ£¬·´ÕýÖ»Òªrm ÃüÁîÓ÷¨ÊÇÒ»ÑùµÄ£¬ÄǾÍûÎÊÌ⣡
########################################################################################
×÷ÕߣºÀî½Ü
·¢²¼Ê±¼ä£º 2010-05-07
°æ±¾£º1.0
½Å±¾¹¦ÄÜ£º
1.   ÔÚÓû§Ö´ÐÐrmÃüÁîʱ£¬½«ÎļþÒÆ¶¯/dump-file/ £¬±» ÒÆ¶¯µ½dump-file Ŀ¼ÏµÄÎļþ¡¢Îļþ¼ÐÒÔÔ­ÎļþÃû+ɾ³ý³ýµÄÈÕÆÚ¸ñʽ´æ·Å£¬Èç weather.txt ÔÚɾ³ýºó¾Í»á±»×Ô¶¯Òƶ¯µ½/dump-file/ ϲ¢ÃüÃûΪweather.txt_2010-05-07_14:46:51.bak
2.   ´ËÃüÁîÔÚÖ´ÐÐʱ»á¼ì²âÎļþ»òĿ¼µÄ´óС£¬Èç¹ûÎļþ»òĿ¼³¬¹ý2GB£¬½«²»»áÔÙ½«ÎļþÒÆ¶¯µ½»ØÊÕÕ¾£¬¶ø»áÖ±½Óɾ³ý£¬´Ë¹¦ÄÜÊÇΪÁ˱ÜÃâ»ØÊÕÕ¾¹ý´ó¶ø¶ÔϵͳÔì³ÉÓ°Ïì
°²×°ÐèÇó£º
1.´´½¨É¾³ýÎļþ´æ·ÅĿ¼mkdir /dump-file/ && chmod -R 777 /dump-file
2.´´½¨ÈÕÖ¾Êä³öÎļþ touch /tmp/rm.dump && chmod -R 777 /tmp/rm.dump
3.½«ÏµÍ³rmÃüÁîÒÆ¶¯³É rm.bak  £º mv /bin/rm /bin/rm.bak
4.½«´Ë½Å±¾ÃüÃûΪ/bin/rm ²¢¸øÓè¿ÉÖ´ÐÐȨÏÞ £ºchmod 644 /bin/rm  
#!/bin/bash
DumpFile=/dump-file/
File=`echo $line|awk '{print $2}'`
aa=$(echo $1|grep "^-")
###
function TestDir(){
Test_Dir=$(echo $line|grep "/") #test if is a directory.
Test_Dir2=$(echo $line |awk '{print $2}'|grep "^/") # Test if the prameter starts with "/".
Dir2=$(echo $line |awk -F/ '{print $2}') #Extract the prameter after the first "/".
Dir=$(echo $line |awk '{print $2}'|awk -F/ '{print $1}') ##Extract the prameter before the first "/".
D1=`date +%F_%H:%M:%S.bak`
Date=`echo $line


Ïà¹ØÎĵµ£º

Linux µÄ¶àÏ̱߳à³ÌµÄ¸ßЧ¿ª·¢¾­Ñé

2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾­Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄϰ¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......

linux c ¶ÁÈ¡ÎļþÐÐÊý

linux c ¶ÁÈ¡ÎļþÐÐÊý²ÎÕÕwc ϵͳÃüÁî±àдµÄº¯ÊýÈçÏ£º
#include <fcntl.h>
#include <stdlib.h>
#define MAXBSIZE 65536
u_long file_wc(char *file)
{
register u_char *p;
register short gotsp;
register int ch, len;
register u_long linect, charct;
int fd;
u_char buf[MAXBSIZE];
......

Linux»·¾³½ø³Ì¼äͨÐÅ£¨Î壩: ¹²ÏíÄڴ棨ÉÏ£©


¹²ÏíÄÚ´æ¿ÉÒÔ˵ÊÇ×îÓÐÓõĽø³Ì¼äͨÐÅ·½Ê½£¬Ò²ÊÇ×î¿ìµÄIPCÐÎʽ¡£Á½¸ö²»Í¬½ø³ÌA¡¢B¹²ÏíÄÚ´æµÄÒâ˼ÊÇ£¬Í¬Ò»¿éÎïÀíÄÚ´æ±»Ó³Éäµ½½ø³ÌA¡¢B¸÷×ԵĽø³ÌµØÖ·¿Õ¼ä¡£½ø³ÌA¿ÉÒÔ¼´Ê±¿´µ½½ø³ÌB¶Ô¹²ÏíÄÚ´æÖÐÊý¾ÝµÄ¸üУ¬·´Ö®ÒàÈ»¡£ÓÉÓÚ¶à¸ö½ø³Ì¹²Ïíͬһ¿éÄÚ´æÇøÓò£¬±ØÈ»ÐèҪijÖÖͬ²½»úÖÆ£¬»¥³âËøºÍÐźÅÁ¿¶¼¿ÉÒÔ¡£
²ÉÓù²ÏíÄÚ´æÍ¨ÐŵÄÒ»¸ ......

ϵͳѧϰLinuxµÄʮһµã½¨Òé

Ëæ×ÅLinuxÓ¦ÓõÄÀ©Õ¹Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥Linux£¬¸ù¾ÝѧϰWindwosµÄ¾­ÑéÍùÍùÓÐһЩãȻµÄ¸Ð¾õ£º²»Öª´ÓºÎ´¦¿ªÊ¼Ñ§Æð¡£ÕâÀï½éÉÜѧϰLinuxµÄһЩ½¨Òé¡£
Ò»¡¢´Ó»ù´¡¿ªÊ¼
³£³£ÓÐЩÅóÓÑÔÚLinuxÂÛ̳ÎÊһЩÎÊÌ⣬²»¹ý£¬ÆäÖдó¶àÊýµÄÎÊÌâ¶¼ÊǺܻù´¡µÄ¡£ÀýÈ磺ΪʲôÎÒʹÓÃÒ»¸öÃüÁîµÄʱºò£¬ÏµÍ³¸æËßÎÒÕÒ²»µ½¸ÃĿ¼£¬ÎÒÒªÈçºÎ ÏÞÖÆÊ¹ÓÃÕß ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ