linuxµÄÎļþºÍĿ¼
chmod £»ÐÞ¸ÄĿ¼ȨÏÞ
eg£ºchmod o-t /tmp
touch:´´½¨ÐÂÎļþ
rm -rf:ɾ³ýÎļþ
set gid ¶ÔĿ¼µÄ×÷ÓÃ
1£ºÄ¬ÈÏÇé¿öÏ£¬Óû§½¨Á¢µÄÎļþÊôÓÚÓû§µ±Ç°ËùÔÚµÄ×é
2£ºÄ¿Â¼ÉÏÉèÖÃÁËsetgid£¬±íʾÔÚ´ËĿ¼ÖУ¬ÈκÎÈ˽¨Á¢µÄÎļþ£¬¶¼»áÊôÓÚĿ¼ËùÊôµÄ×é¡£
rm -rf test //ɾ³ý֮ǰµÄtestĿ¼
mkdir test // ÔÚµ±Ç°Ä¿Â¼´´½¨Ò»¸ötestĿ¼
ls -ld test //²é¿´Õâ¸öĿ¼µÄ³¤¸ñʽÃ÷ϸ
chgrp xiaowang test //¸ü¸ÄtestĿ¼ÎļþµÄËùÊô×éΪxiaowang
ls -ld test //²é¿´±ä»»Ö®ºóµÄ½á¹¹·¢ÏÖĿ¼ÎļþµÄËùÊô×é±äΪxiaowang
cd test //Çл»µ½testĿ¼
touch test.txt //ÔÚ¸ÃĿ¼ÏÈ´´½¨Ò»¸öÎļþ
ls -l //²é¿´¸ÃÎļþµÄ³¤¸ñʽÃ÷ϸ£¬·¢ÏÖ¸ÃÎļþµÄËùÊô×é²¢·Çxiaowang£¬¶øÊÇroot
ÕâÒ»Àý×Ó˵Ã÷ÁËĬÈÏÇé¿öÏ£¬rootÓû§½¨Á¢µÄÎļþÊôÓÚÓû§rootµ±Ç°ËùÔÚµÄ×é
mkdir test1
ls -ld test1
chmod 745 test1
ls -ld test1
Õâ¸öÀý×ÓÓÃÀ´ËµÃ÷ÑÝʾСдsºÍ´óдS
ðÏÕλ¶ÔĿ¼×÷ÓÃ
1£ºÄ¬ÈÏÇé¿öÏ£¬Èç¹ûÒ»¸öĿ¼ÉÏÓÐWºÍXȨÏÞ£¬ÔòÈκÎÈË¿ÉÒÔÔÚ´ËĿ¼Öн¨Á¢Óëɾ³ýÎļþ
2£ºÒ»µ©Ä¿Â¼ÉÏÉèÖÃÁËðÏÕ룬Ôò±íʾÔÚ´ËĿ¼ÖУ¬Ö»ÓÐÎļþµÄÓµÓÐÕߣ¬Ä¿Â¼µÄÓµÓÐÕßÓëϵͳ¹ÜÀíÔ±¿ÉÒÔɾ³ýÎļþ
Ç¿ÖÆλ¶ÔĿ¼µÄ×÷ÓÃ
1£ºÔÚ¿ÉÖ´ÐÐÎļþÉÏ£¬Óû§¿ÉÒÔÌí¼Óset uidºÍset gid¡£
2£ºÄ¬ÈÏÇé¿öÏ£¬Óû§Ö´ÐÐÒ»¸öÖ¸Á»áÒÔ¸ÃÓû§µÄÉí·ÝÀ´ÔËÐнø³Ì¡£
3£ºÖ¸ÁîÎļþÉϵÄÇ¿ÖÆ룬¿ÉÒÔÈÃÓû§Ö´ÐеÄÖ¸ÁÒÔÖ¸ÁîÎļþµÄÓµÓÐÕß»òËùÊô×éµÄÉí·ÝÔËÐнø³Ì¡£
ÉèÖÃÇ¿ÖÆλºÍðÏÕλ
·½·¨Ò»£ºÓû§¿ÉÒÔÓÃchmodÖ¸ÁîÀ´ÎªÎļþÉèÖÃÇ¿ÖÆλºÍðÏÕλ
set uid: chmod u+s ÎļþÃû
set gid: chmod g+s ÎļþÃû
sticky : chmod o+t ÎļþÃû
·½·¨¶þ£º
4(set uid) Ö»ÄÜÔÚÎļþÉÏÉ趨£¬²»ÄÜÔÙĿ¼ÉÏÉ趨
2(set gid) ¶¼¿ÉÒÔ
1(sticky) Ö»ÄÜÔÚĿ¼ÉÏÉ趨£¬²»ÄÜÔÙÎļþÉÏÉ趨
chmod 4777 test.txt
ÉèÖÃÎļþȨÏÞ
Ó²Á´½ÓºÍÈíÁ´½Ó
Àý£º¸øĿ¼½¨Á¢ÈíÁ´½Ó£¬In-s
cd /home //Çл»µ½homeĿ¼
ls //²é¿´homeĿ¼ÏµÄÎļþ
touch test.txt //ÔÚhomeĿ¼ÏÂн¨Ò»¸ötest.txtµÄÎļþ
cd~ //Çл»µ½Ö÷Ŀ¼
In/home/test.txt tom.txt //¸øhomeĿ¼ÏµÄtest.tx
Ïà¹ØÎĵµ£º
Ò». ʲôÊÇÐźÅÁ¿
ÐźÅÁ¿(Semaphore)-- Ï൱һ¸öÐźŵƣ¬³ÌÐòÀïÊÇÒ»¸ö·Ç¸ºÕûÊý£¬±íʾ״̬.
¿ÉÒÔÓÃÀ´±£»¤Á½¸ö»ò¶à¸ö¹Ø¼ü´úÂë¶Î£¬ÕâЩ¹Ø¼ü´úÂë¶Î²»Äܲ¢·¢µ÷Óá£ÔÚ½øÈëÒ»¸ö¹Ø¼ü´úÂë¶Î֮ǰ£¬Ï̱߳ØÐë»ñÈ¡Ò»¸öÐźÅÁ¿¡£
Èç¹û¹Ø¼ü´úÂë¶ÎÖÐûÓÐÈκÎỊ̈߳¬ÄÇôÏ̻߳áÁ¢¼´½øÈë¸Ã¿òͼÖеÄÄǸö²¿·Ö¡£Ò»µ©¸Ã¹Ø¼ü´úÂë¶ÎÍê³ÉÁË£¬ÄÇô¸Ã ......
±¾ÎļǼһϱ¾ÈË°²×°LAMPµÄÈ«¹ý³Ì
±¾ÈËʹÓõÄLinuxΪRedHat Enterprise 5 X64
µÚÒ»²½:°²×°Mysql
MysqlµÄ°²×°±È½Ï¼òµ¥£¬ÎªÁ˱ÜÃâ³öÏÖÎļþÕÒ²»µ½µÄÇé¿ö£¬ÎÒÒÀ´ÎÏÂÔØ°²×°ÁËÒÔÏÂ4¸öRPM°ü
MySQL-server-community-5.1.46-1.rhel5.x86_64.rpm
MySQL-client-community-5.1.46-1.rhel5.x86_64.rpm
MySQL-devel-commu ......
ls :²é¿´µ±Ç°Ä¿Â¼ÏµÄÎļþ
ls -l ;ÒÔÍêÕû¸ñʽ²é¿´Îļþ
help;²é¿´°ïÖúÐÅÏ¢
man;Ò²ÊDz鿴°ïÖúÐÅÏ¢,µ«ÊDZÈhelp¸üÏêϸ
info;ͬÑùÊDz鿴°ïÖúÐÅÏ¢,±Èman¸üÏêϸ
cp;¿½±´Îļþ(Ò²¿ÉÒÔ¿½±´Ä¿Â¼)
mv;Òƶ¯Îļþ»òÕßÖØÃüÃû
rm;ɾ³ýÎļþ
pwd;²é¿´ÎļþµÄÍêÕû·¾¶
touch ;´´½¨¿ÕÎļþ
cd;¸Ä±äµ±Ç°Â·¾¶
cat;²é¿´ÎļþÄÚÈÝ
mor ......
ת×Ô£ºhttp://www.oracle.com/technology/global/cn/pub/articles/calish-find.html
Linux find
ÃüÁîÊÇËùÓÐ Linux ÃüÁîÖÐ×îÓÐÓõÄÒ»¸ö£¬Í¬Ê±Ò²ÊÇ×î»ìÂÒµÄÒ»¸ö¡£ËüºÜÄÑ£¬ÒòΪËüµÄÓï·¨ÓëÆäËû
Linux ÃüÁîµÄ±ê×¼Óï·¨²»Í¬¡£µ«ÊÇ£¬ËüºÜÇ¿´ó£¬ÒòΪËüÔÊÐíÄú°´ÎļþÃû¡¢ÎļþÀàÐÍ¡¢Óû§ÉõÖÁÊÇʱ¼ä´Á²éÕÒÎļþ¡£Ê¹Óà find
̟産 ......