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

FreeBSD ÎļþºÍĿ¼²éÕÒ

·¢²¼Ê±¼ä:2006-08-15 10:49:35À´Ô´:ºìÁª×÷Õß:samblue
0. Ç°ÑÔ

µµ°¸ËÑÑ°£¬¶ÔÓÚÒ»¸öÐÂϵͳÀ´Ëµ£¬¿ÉÄÜûÓкܴóµÄÓÃ;£»
µ«ÊǶÔÓÚÒ»¸ö¾Éϵͳ£¬µµ°¸¼°ÎļþÔ½À´Ô½¶à£¬ Õâʱ¾Í±ØÐëÒªÓÃËÑÑ°À´ÕÒÑ°µµ°¸ÁË¡£

1.which

Ö¸Áî : which £¨ locate a program file in the user's path £©
Óï·¨ : which program
ÓÃ; : ´ÓʹÓÃÕßµÄÖ´Ðз¾¶£¬Ñ°ÕÒÖ´ÐÐÎļþ¡£
ʵÀý : ËÑÑ° cd µÄλÖá£

2.whereis Ö¸Áî : whereis £¨ locate programs £©

Óï·¨ : whereis [ -bms ] program
ÓÃ; : Ñ°ÕÒԭʼ³ÌÐòÊý¾Ý¼Ð (source directory), ¶þ½øÖƳÌÐò (binary). ʹÓÃÊÖ²á (manuals)
²ÎÊý : -b ËÑÑ°¶þ½øÖƳÌÐò £» -m ËÑѰʹÓÃÕßÊÖ²á £» -s ËÑѰԭʼ³ÌÐòµÄÊý¾Ý¼Ð
ʵÀý :
(1) ËÑÑ° cd ʹÓÃÕßÊÖ²áµÄλÖá£
( 2) ËÑÑ° cd Ö´ÐÐÎļþµÄλÖá£
˵Ã÷ : Èô²»¼ÓÈκβÎÊý£¬Ôò±íʾ -bms ¶¼ÓС£ ʵÀýÖгöÏÖ¾¯¸æѶϢÄËÊÇÒòÅÝÅÝδ°²×° X-window µÄ¹Øϵ¡£
3.find

Ö¸Áî : find £¨ walk a file hierarchy £©
Óï·¨ : find ÆðʼĿ¼ -name ÓûÕÒµÄÎļþÃû -print
ÓÃ; : ÔÚµµ°¸ÏµÍ³¼Ü¹¹ÖÐËÑÑ°¡£
ʵÀý : ÔÚĿǰĿ¼ÖУ¬ËÑÑ°ÃûΪ test µÄµµ°¸¡£

4.grep Ö¸Áî : grep £¨ print lines matching a pattern £©

Óï·¨ : grep pattern file_name
ÓÃ; : ËÑÑ°µµ°¸ÄÚÈÝÖк¬ÓÐ pattern µÄÐС£
ʵÀý : ËÑÑ°µµ°¸ test ÖУ¬°üº¬ panda µÄÐС£
ÏÈÏÔʾµµ°¸ÄÚÈÝ£º


5.locate

Ö¸Áî : locate £¨ find filenames quickly £©
Óï·¨ : locate program/file
ÓÃ; : ´Óϵͳ½¨Á¢µÄÊý¾Ý¿âÖÐËÑÑ°µµ°¸¼°Êý¾Ý¼Ð¡£
ʵÀý : ´ÓÊý¾Ý¿âÖÐËÑÑ° test µµ°¸¡£
Ã÷ : /var/db/locate.database Ô¤ÉèµÄ locate Êý¾Ý¿â£º /usr/libexec/locate.updatedb
¸üРlocate Êý¾Ý¿âµÄ script µµ°¸¡£ /etc/periodic/weekly/310.locate ¶¨Ê±¸üÐÂÖؽ¨ locate Êý¾Ý¿âµÄ script µµ°¸¡£

²¹³ä : Òò locate Ô¤Éèÿһ¸öÐÇÆڲŸüÐÂÒ»´ÎÊý¾Ý¿â£¬ËùÒÔн¨Á¢µÄµµ°¸²»»á³öÏÖ¡£ µ«ÊÇËüµÄÊý¾ÝÏÔʾÁ¿ÊÇ×î¶àµÄà¸

ºÙºÙ£¬ÕâÊÇһƪºÃµÄ×ÊÁÏÎÄÕ£¬µ«ÊÇͼƬÔÚÔ­À´µÄÎÄÕµØÁ´½ÓÒѾ­»µÁË¡£
Ö»ÄÜ´Õ»òÕß¿´ÁË¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ