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

linux ÏÂwhich¡¢whereis¡¢locate¡¢findÇø±ð

µ±ÎÒÃÇÐèҪij¸öÎļþ»òĿ¼ʱ£¬¶øÓÖ²»ÖªµÀ¸ÃÎļþ·ÅÔÚʲôµØ·½£¬Ôõô°ì£¿
ÔÚwindowsÏÂÃ棬¿ÉÒÔͨ¹ý“ËÑË÷”¹¦ÄܽøÐвéÕÒ£¬¶øÔÚlinuxÏ£¬Í¬ÑùÓÐÏàͬµÄ¹¦ÄÜ£º
which       ²é¿´¿ÉÖ´ÐÐÎļþµÄλÖÃ
whereis     ²é¿´ÎļþµÄλÖÃ
locate      ÅäºÏÊý¾Ý¿â²é¿´ÎļþλÖÃ
find        ʵ¼ÊËÑÑ°Ó²Å̲éѯÎļþÃû³Æ
 
1¡¢which
Óï·¨£º
[root@redhat ~]# which ¿ÉÖ´ÐÐÎļþÃû³Æ
ÀýÈ磺
[root@redhat ~]# which passwd
/usr/bin/passwd
whichÊÇͨ¹ýPATH»·¾³±äÁ¿µ½¸Ã·¾¶ÄÚ²éÕÒ¿ÉÖ´ÐÐÎļþ£¬ËùÒÔ»ù±¾µÄ¹¦ÄÜÊÇÑ°ÕÒ¿ÉÖ´ÐÐÎļþ
 
2¡¢whereis
Óï·¨£º
[root@redhat ~]# whereis [-bmsu] Îļþ»òÕßĿ¼Ãû³Æ
²ÎÊý˵Ã÷£º
-b £º Ö»ÕÒ¶þ½øÖÆÎļþ
-m : Ö»ÕÒÔÚ˵Ã÷Îļþmanual·¾¶ÏµÄÎļþ
-s £º Ö»ÕÒsourceÔ´Îļþ
-u £º ûÓÐ˵Ã÷ÎĵµµÄÎļþ
ÀýÈ磺
[root@redhat ~]# whereis passwd
passwd: /usr/bin/passwd /etc/passwd /usr/share/man/man1/passwd.1.gz /usr/share/man/man5/passwd.5.gz
½«ºÍpasswdÎļþÏà¹ØµÄÎļþ¶¼²éÕÒ³öÀ´
 
[root@redhat ~]# whereis -b passwd
passwd: /usr/bin/passwd /etc/passwd
Ö»½«¶þ½øÖÆÎļþ²éÕÒ³öÀ´
 
ºÍfindÏà±È£¬whereis²éÕÒµÄËٶȷdz£¿ì£¬ÕâÊÇÒòΪlinuxϵͳ»á½«ÏµÍ³ÄÚµÄËùÓÐÎļþ¶¼¼Ç¼ÔÚÒ»¸öÊý¾Ý¿âÎļþÖУ¬µ±Ê¹ÓÃwhereisºÍÏÂÃæ¼´½«½éÉܵÄlocateʱ£¬»á´ÓÊý¾Ý¿âÖвéÕÒÊý¾Ý£¬¶ø²»ÊÇÏñfindÃüÁîÄÇÑù£¬Í¨¹ý±éÀúÓ²ÅÌÀ´²éÕÒ£¬Ð§ÂÊ×ÔÈ»»áºÜ¸ß¡£
µ«ÊǸÃÊý¾Ý¿âÎļþ²¢²»ÊÇʵʱ¸üУ¬Ä¬ÈÏÇé¿öÏÂʱһÐÇÆÚ¸üÐÂÒ»´Î£¬Òò´Ë£¬ÎÒÃÇÔÚÓÃwhereisºÍlocate²éÕÒÎļþʱ£¬ÓÐʱ»áÕÒµ½ÒѾ­±»É¾³ýµÄÊý¾Ý£¬»òÕ߸ոս¨Á¢Îļþ£¬È´ÎÞ·¨²éÕÒµ½£¬Ô­Òò¾ÍÊÇÒòΪÊý¾Ý¿âÎļþûÓб»¸üС£
 
3¡¢locate
Óï·¨£º
[root@redhat ~]# locate Îļþ»òÕßĿ¼Ãû³Æ
ÀýÈ磺
[root@redhat ~]# locate passwd
/home/weblogic/bea/user_projects/domains/zhanggongzhe112/myserver/stage/_appsdir_DB_war/DB.war/jsp/as/user/passwd.jsp
/home/weblogic/bea/user_projects/domains/zhanggongzhe112/myserver/stage/_appsdir_admin_war/admin.war/jsp/platform/passwd.jsp
/lib/security/pam_unix_passwd.so
/lib/security/pam_passwdqc.so
/usr/include/rpcsvc/yppasswd.x
/usr/include/rpcsvc


Ïà¹ØÎĵµ£º

linux ÏÂvsdftpÅäÖÃÎļþÏê½â

vsftpd.conf ÊÇvsftpdµÄÅäÖÃÎļþ£¬ÓÃÀ´¿ØÖÆvsftpdµÄ¸÷ÏÄÜ¡£Ä¬ÈÏ״̬Ï£¬ËüµÄλÖÃÊÇ/etc/vsftpd.conf»òÕßÔÚ/etc/vsftpd/vsftpd.conf¡£
¡¡¡¡È»¶ø£¬ÄãÒ²¿ÉÒÔͨ¹ýÐÞ¸ÄÅäÖÃÐÐÀ´Ö¸¶¨µ½ÆäËüĿ¼¡£ÕâÒ»µãºÜÓÐÓã¬ÒòΪҲÐíÄãÏëʹÓÃһЩ¸ß¼¶inetd¹¦ÄÜ£¬ÀýÈçxinetd£¬ÔÚÒ»¸ö¶àÐéÄâÖ÷»úµÄ»úÆ÷Éϵ÷Óò»Í¬µÄÅäÖÃÎļþ¡£
¡¡¡¡¸ñʽ
¡¡¡¡ ......

linux CÕýÔò±í´ïʽ——POSIXÕýÔò²âÊÔ

ÕâÊÇCµÄÔ­³ÌÐò
#include <stdio.h>
#include <regex.h>
int main(int argc, char** argv)
{
regex_t reg;
regmatch_t pm[10];
char *pattern;
char buf[50];
const size_t nmatch = 10;

pattern = argv[1];
int result = regcomp(®, pattern, REG_EXTENDED);
while( fgets ......

linuxÉ豸ºÅÖ®²Ù×÷

×÷ÕߣºÀîÇ¿,»ªÇåÔ¶¼ûǶÈëʽѧԺ½²Ê¦¡£
ÔÚLinuxÉ豸Çý¶¯ÖУ¬É豸ºÅÉèÒ»¸öºÜÖØÒªµÄ¸ÅÄîºÍ±äÁ¿¡£²»ÂÛÊÇÖ÷É豸ºÅ£¬»¹ÊÇ´ÎÉ豸ºÅ£¬ÔÚÉ豸Çý¶¯Öж¼Õ¼¾ÝÁ˺ÜÖØÒªµÄµØλ¡£ÄÇôËûÔÚKernelÖÐÊÇÈçºÎ²Ù×÷µÄ£¿Õâ¸öÊý¾Ý½á¹¹¶¼ÊÇͨ¹ýÄÇЩº¯Êý¿ÉÒÔºÜÈÝÒ×µÄÔÚÎÒÃÇдLinuxÉ豸Çý¶¯Ä£¿éʱ±»ÎÒÃÇËùʹÓÃÄØ£¿
ÔÚinclude/linux/type.hÎļþÖÐÎÒÃÇÄ ......

£¨×ª£©linux¸÷Îļþ¼ÐµÄ×÷ÓÃ

linux
ϵÄÎļþ½á¹¹£¬¿´¿´Ã¿¸öÎļþ¼Ð¶¼ÊǸÉÂðÓõÄ
/bin
¶þ½øÖÆ¿ÉÖ´ÐÐÃüÁî
/dev
É豸ÌØÊâÎļþ
/etc
ϵͳ¹ÜÀíºÍÅäÖÃÎļþ
/etc/rc.d
Æô¶¯µÄÅäÖÃÎļþºÍ½Å±¾
/home
Óû§Ö÷Ŀ¼µÄ»ùµã£¬±ÈÈçÓû§user
µÄÖ÷Ŀ¼¾ÍÊÇ/home/user
£¬¿ÉÒÔÓÃ~user
±íʾ
/lib
±ê×¼³ÌÐòÉè¼Æ¿â£¬Óֽж¯Ì¬Á´½Ó¹²Ïí¿â£¬×÷ÓÃÀàËÆwindows
ÀïµÄ. ......

¡¾×ª¡¿Í¼ÎÄÑÝʾ15Ãë»Ö¸´Linux rootÓû§ÃÜÂë


Ô­ÎÄ£ºhttp://www.webjx.com/htmldata/2007-10-05/1191585088.html
°´³£Àí²»¿ÉÒÔÍü¼ÇrootÓû§ÃÜÂëµÄ£¬µ«ÊÇÈç¹ûÕæµÄÍü¼ÇÁË£¬Ò²²»ÓóÕâ¸öÊÇÓа취½â¾öµÄ¡£
15Ãë»Ö¸´rootÃÜÂ룬µ±È»ÊÇûËãÉÏϵͳµÄÆô¶¯Ê±¼äÁË¡£ºÇºÇ¡£
ÏÂÃæÊÇÎÒ¸øroot»Ö¸´ÃÜÂëµÄʵÑé¹ý³Ì.£¨ÓõÄÊÇRHEL4£©¡£
ͼ1
¿ª»úµÄʱºò°´e £¬£¨Èçͼ£¬¾ÍÔÚÕâ¸öʱºò° ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ