LinuxÎļþËÑË÷Ö® find / locate / whereis / which
ÒýÑÔ
find×îÇ¿´ó£¬Ê²Ã´¶¼Äܲ飬¿ÉÒÔ¸ù¾ÝÌõ¼þ²éÕÒÎļþ¡£
whichÖ»Äܲé¿ÉÖ´ÐÐÎļþºÍ±ðÃû(alias)¡£
whereisÖ»Äܲé¶þ½øÖÆÎļþ¡¢ËµÃ÷Îĵµ£¬Ô´ÎļþµÈ£¬¿ÉÒÔÕÒµ½¿ÉÖ´ÐгÌÐòºÍman page¡£
locateÊÇÔÚÊý¾Ý¿âÀï²éÕÒ£¬Êý¾Ý¿â´óÖÁÿÌì¸üÐÂÒ»´Î£¬µ«¸úwhereisÒ»Ñù¶¼ÊDzéÊý¾Ý¿âÀïµÄÄÚÈÝ¡£
1.find /etc -name my.so
2.locate ÊÇÓÃÀ´Í¨¹ýÎļþÃûËÑË÷ÎļþµÄ¹¤¾ß£¬ËüµÄÓ÷¨Ò²±È½Ï¼òµ¥¡£locate µÄÓ¦Óã¬Ê×ÏÈҪͨ¹ýupdatedb½¨Á¢Ë÷ÒýÊý¾Ý¿â£¬È»ºó²ÅÄÜÓ¦Óã»Èç¹ûÄúа²×°ÁËÈí¼þ»òÕß´æ·ÅÁËеÄÎļþ£¬Ò²ÒªÏÈÔËÐÐupdatedbÃüÁÒÔÉú³É×îÐÂË÷Òý¿â¡£
Ó÷¨£ºlocate ÎļþÃû
ÎÒÃÇÒªÏÈÔËÐÐupdatedb£»
[root@localhost ~]# updatedb
¾ÙÀý£º ÎÒÃÇÒªÕÒvsftpd.confÎļþ¶¼Î»ÓÚÄĸöλÖã»
[root@localhost ~]# locate my.so
3.whereis ÊÇÀ´Ñ°ÕÒÃüÁîµÄ¶þ½øÖÆÎļþ£¬Í¬Ê±Ò²»áÕÒµ½Æä°ïÖúÎļþ£»
±ÈÈçÎÒÃDz»ÖªµÀfdisk¹¤¾ß·ÅÔÚÄÄÀÎÒÃǾͿÉÒÔÓÃwhereis fdisk À´²éÕÒ£»
[root@localhost ~]# whereis fdisk
fdisk: /sbin/fdisk /usr/share/man/man8/fdisk.8.gz
Èç¹ûÎÒÃÇѰÕÒgrubÔÚÄÄÀӦ¸ÃÓÃÈçÏÂÃüÁ˵Ã÷grubλÓÚ/sbinĿ¼£¬ËûµÄ°ïÖúÎļþÊÇgrub.8.gz £¬Ò²¾ÍÊÇman grub£»
[root@localhost ~]# whereis grub
grub: /sbin/grub /etc/grub.conf /usr/share/grub /usr/share/man/man8/grub.8.gz
4.which ºÍwhere ÏàËÆ£¬Ö»ÊÇÎÒÃÇËùÉèÖõĻ·¾³±äÁ¿ÖÐÉèÖúõÄ·¾¶ÖÐѰÕÒ£»±ÈÈ磻
[root@localhost ~]# which fdisk
/sbin/fdisk
×ܽ᣺
findÊÇ´ÓÖ¸¶¨Ä¿Â¼¿ªÊ¼·Ö¼¶²éÕÒ,ȱµãÊÇËÙ¶ÈÂý,µ«ÊDzéµÄÎļþÊǵ±Ç°´æÔÚÔÚÓ²ÅÌÉϵÄÎļþ ;
locateÊÇ´ÓÉú³ÉµÄÊý¾Ý¿â¿ªÊ¼²éÕÕ,ËٶȺܿì,µ«ÊÇÊý¾Ý¿âÐèÒª¶¨ÆÚ¸üУ¬Ò»°ãÊÇÿ´Î¿ª»úµÄʱºò£¨Ò²¿ÉÒÔÊÖ¶¯Ö´ÐÐ updatedb ÃüÁî);
whichÖ»Äܲé¿ÉÖ´ÐÐÎļþºÍ±ðÃû(alias);
whereisÖ»Äܲé¶þ½øÖÆÎļþ¡¢ËµÃ÷Îĵµ£¬Ô´ÎļþµÈ£¬¿ÉÒÔÕÒµ½¿ÉÖ´ÐгÌÐòºÍman page¡£
Ïà¹ØÎĵµ£º
ÔËÐÐÈçÏÂÃüÁ¿É¿´µ½LinuxÖ§³ÖµÄÐźÅÁÐ±í£º
$ kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL
5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE
9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2
13) SIGPIPE 14) SIGALRM 15) SIGTERM 17) SIGCHLD
18) S ......
ÆäÖÐÓÐһЩº¯ÊýµÄ×÷ÓÃÍêÈ«Ïàͬ£¬Ö»ÊDzÎÊý²»Í¬¡££¨¿ÉÄܺܶàÊìϤC++ÅóÓÑÂíÉϾÍÄÜÁªÏëÆðº¯ÊýÖØÔØ£¬µ«ÊDZðÍüÁËLinuxºËÐÄÊÇÓÃCÓïÑÔдµÄ£¬ËùÒÔÖ»
ÄÜÈ¡³É²»Í¬µÄº¯ÊýÃû£©¡£»¹ÓÐһЩº¯ÊýÒѾ¹ýʱ£¬±»ÐµĸüºÃµÄº¯ÊýËù´úÌæÁË£¨gccÔÚÁ´½ÓÕâЩº¯Êýʱ»á·¢³ö¾¯¸æ£©£¬µ«ÒòΪ¼æÈݵÄÔÒò»¹±£Áô×Å£¬ÕâЩº¯ÊýÔÚǰ
Ãæ±êÉÏ“*”ºÅÒÔÊ ......
ʵÀý½â˵ fdisk ʹÓ÷½·¨
×÷Õߣº±±ÄÏÄϱ±
À´×Ô£ºLinuxSir.Org
ÌáÒª£ºfdisk ÊÇÒ»¿î¹¦ÄÜÇ¿´óµÄ·ÖÇø¹¤¾ß£¬Ò²ÊÇĿǰÔÚUnixÀà²Ù×÷ϵͳÖÐ×îÁ÷ÐеŤ¾ßÖ®Ò»£»·ÖÇø¹¤¾ßÀÏ×ֺţ»±¾ÆªÖ»½éÉÜÆä×î¼òµ¥µÄ·ÖÇø²Ù×÷¹¦ÄÜ£»
Ò»¡¢fdisk µÄ½éÉÜ£»
fdisk - Partition table manipulator for Linux £¬Òë³ÉÖÐÎĵÄÒâ˼ÊÇ´ÅÅÌ·ÖÇø±í²Ù×÷¹¤¾ß£»± ......
½øÐжàÏ̱߳à³Ì£¬×îÍ·Ì۵ľÍÊÇÄÇЩ¹²ÏíµÄÊý¾Ý¡£ÒòΪÄãÎÞ·¨ÖªµÀÄĸöÏ̻߳áÔÚÄĸöʱºò¶ÔËü½øÐвÙ×÷£¬ÄãÒ²ÎÞ·¨µÃÖªÄǸöÏ̻߳áÏÈÔËÐУ¬ÄĸöÏ̻߳áºóÔËÐС£ÏÂÃæ½éÉÜһЩ¼¼Êõ£¬Í¨¹ýËûÃÇ£¬Äã»áºÏÀí°²ÅÅÄãµÄÏß³ÌÖ®¼ä¶Ô×ÊÔ´µÄ¾ºÕù¡£
l »¥³âÌåMutex
l &nbs ......