ºìÁªLinuxÃÅ»§
Linux°ïÖú

linuxÒ»¾ä»°¾«²Ê½â´ð26

·¢²¼Ê±¼ä:2006-11-06 22:55:28À´Ô´:ºìÁª×÷Õß:snqyss
0131 RedHat LinuxÀïÐÞ¸Äʱ¼äµÄ²½Öè(hutuworm)
1. ÉèÖÃÄãµÄʱÇø£º timeconfigÀïÑ¡ÔñAsia/Shanghai £¨Èç¹ûÄãλÓÚGMT+8ÖйúÇøÓò£©
2. Óë±ê׼ʱ¼ä·þÎñÆ÷У׼£º ntpdate time.nist.gov
2.5 µ±È»£¬Èç¹ûÄãÊÇÀî¼Î³Ï£¬Ò²¿ÉÒÔ¸ú×Ô¼ºµÄÊÖ±íУ׼£º date -s STRING
£¨STRING¸ñʽ¼ûman date£©
3. д»ØÓ²¼þʱÖÓ£º hwclock --systohc
0132 ²éÕÒµ±Ç°Ä¿Â¼ÏÂÎļþ²¢¸ü¸ÄÀ©Õ¹Ãû(Áã¶þÄêµÄÏÄÌì)
¸ü¸ÄËùÓÐ.ssÎļþΪ.aa
# find ./ -name "*.ss" -exec rename .ss .aa '{}' \;
0133 patchµÄʹÓÃ(Ìì²Å¡ùӣľ)
Óï·¨ÊÇpatch [options] [originalfile] [patchfile]
ÀýÈ磺
patch -p[num] -p²ÎÊý¾ö¶¨ÁËÊÇ·ñʹÓöÁ³öµÄÔ´ÎļþÃûµÄǰ׺Ŀ¼ÐÅÏ¢£¬²»Ìṩ-p²ÎÊý£¬ÔòºöÂÔËùÓÐĿ¼
ÐÅÏ¢£¬-p0£¨»òÕß-p 0£©±íʾʹÓÃÈ«²¿µÄ·¾¶ÐÅÏ¢£¬-p1½«ºöÂÔµÚÒ»¸ö"/"ÒÔÇ°µÄĿ¼£¬
ÒÀ´ËÀàÍÆ¡£Èç/usr/src/linux-2.4.16/MakefileÕâÑùµÄÎļþÃû£¬ÔÚÌṩ-p3²ÎÊýʱ½«Ê¹ÓÃ
linux-2.4.16/Makefile×÷ΪËùÒªpatchµÄÎļþ¡£
¶ÔÓڸղžٵÄLinuxÄÚºËÔ´Âë2.4.16Éý¼¶°üµÄÀý×Ó£¬¼Ù¶¨Ô´ÂëĿ¼λÓÚ/usr/src/linuxÖУ¬
ÔòÔÚµ±Ç°Ä¿Â¼Îª/usr/srcʱʹÓÃ"patch -p0 /usr/src/linuxʱ£¬"patch -p10134 ½«file.txtÀïµÄ123¸ÄΪ456(hutuworm)
·½·¨1
sed 's/123/456/g' file.txt > file.txt.new
mv -f file.txt.new file.txt
·½·¨2
vi file.txt
ÊäÈëÃüÁ
:%s/123/456/g
0135 ½«Ò»¸ö·ÖÇø¸ñʽ»¯Îªext3ÈÕÖ¾Îļþϵͳ(hutuworm)
mkfs -j /dev/xxxx
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ