Linux/Ubuntu chmodÃüÁîÏê½âʹÓøñʽºÍ·½·¨
ÔÚ Ubuntu Linux ÖÐÓÃÔ´ÂëÎļþ°²×°Èí¼þʱ¾³£¶¼»áÓõ½chmodÃüÁîÀ´¸ü¸ÄÎļþµÄȨÏÞʹÆäÔÚ°²×°Ê±ÓÐÖ´ÐеÄȨÏÞ¡£ÓÉÓÚ Ubuntu Linux ĬÈϲ»ÄÜÓÃrootÕË»§À´µÇ¼ËùÒÔÔÚÓÃchmodÃüÁîÀ´¸ü¸ÄÎļþµÄȨÏÞʱÍùÍùÐèÒª½áºÏsudoÃüÁîÀ´Ê¹Óã¬Èç¹ûÄã¶ÔsudoÃüÁ²»Ì«Á˽⣬ÇëÏÈ¿´¿´±¾Õ¾µÄ¡¶sudoÃüÁîÏê½â¡·
chmod
Linux/Ubuntu ϵͳÖÐÎļþµ÷ÓõÄȨÏÞ·ÖΪÈý¼¶:ÎļþÓµÓÐÕß(u)¡¢Èº×é(g)¡¢ÆäËû(o)¡£ÓÃchmod¾Í¿ÉÒÔ¸ü¸ÄÎļþµÄȨÏÞ¡£chmodÊÇÒ»¸öÏ൱Áé»îµÄÃüÁ¶Ôͬһ¸öÎļþµÄȨÏÞµÄÐ޸ĿÉÒÔÓöàÖÖ·ç¸ñµÄÃüÁî¸ñʽÀ´ÊµÏÖ¡£
·½Ê½Ò»£º
Óï·¨¸ñʽ£º chmod [-vR] mode ÎļþÃû
²ÎÊý˵Ã÷:
mode ȨÏÞÉèÖÃ×Ö´®,¸ñʽΪ[ugoa] [+-=] [rwx]
u ±íʾÎļþµÄÓµÓÐÕß
g ±íʾÓë´ËÎļþÓµÓÐÕßÊôÓÚÒ»¸ö×éȺµÄÈË
o ±íʾÆäËûÈË
a ±íʾ°üº¬ÒÔÉÏÈýÕß¼´ÎļþÓµÓÐÕß(u)¡¢Èº×é(g)¡¢ÆäËû(o)
+ ±íʾÔö¼ÓȨÏÞ
- ±íʾȡÏûȨÏÞ
= ±íʾΨһÉèÖÃȨÏÞ
r ±íʾÓжÁÈ¡µÄȨÏÞ
w ±íʾÓÐдÈëµÄȨÏÞ
x ±íʾÓÐÖ´ÐеÄȨÏÞ
-v ÏÔʾȨÏ޸ıäµÄÏêϸ×ÊÁÏ
-R ±íʾ¶Ôµ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþºÍ×ÓĿ¼½øÐÐÏàͬµÄȨÏÞ¸ü¸Ä
Àý£º
ÎÒÃÇÒª½«µ±Ç°Ä¿Â¼ÏÂownlinuxÕâ¸öÎļþµÄȨÏÞÐÞΪËùÓÐÓû§ÓµÓиÃÎļþµÄ¶ÁÈ¡¡¢Ð´Èë¡¢Ö´ÐеÄȨÏÞ¡£ÔÚÕâÀï¾ÍÐèÒª½áºÏsudoÃüÁîÀ´Ê¹Óã¬Èç¹ûÄã¶ÔsudoÃüÁ²»Ì«Á˽⣬ÇëÏÈ¿´¿´±¾Õ¾µÄ¡¶sudoÃüÁîÏê½â¡·
ownlinux@server:/var/www$ sudo chmod a+rwx ownlinux
[sudo] password for ownlinux: £¨´ËʱÊäÈëÄãµÄÃÜÂ룩
»òÕßʹÓÃ
ownlinux@server:/var/www$ sudo chmod ugo+rwx ownlinux
[sudo] password for ownlinux: £¨´ËʱÊäÈëÄãµÄÃÜÂ룩
ÃüÁî²»Ò»Ñù£¬µ«Ö´ÐкóµÄЧ¹ûÊÇÒ»ÑùµÄ¡£
·½Ê½¶þ£º
Óï·¨¸ñʽ£º chmod [-vR] [No] ÎļþÃû
²ÎÊý˵Ã÷:
No Èýλ´ú±íÏàӦȨÏÞµÄÊý×Ö
-v ÏÔʾȨÏ޸ıäµÄÏêϸ×ÊÁÏ
-R ±íʾ¶Ôµ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþºÍ×ÓĿ¼½øÐÐÏàͬµÄȨÏÞ¸ü¸Ä
¿ÉÄÜÕâÖÖ·½Ê½¶ÔÓÚ³õѧÕßÀ´ËµÓÐÒ»¶¨µÄÄѶȣ¬µ«ÕâÖÖ·½·¨Ñ§»áºóÔÚ¸ü¸ÄÎļþȨÏ޾ͱäµÃ·Ç³£µÄ¼òµ¥¡£ÏàÐÅͨ¹ýÎҵĽéÉÜ´ó¼Ò»áÕÆÎÕÖÖ·½·¨µÄ:)
Ê×ÏÈÁ˽âһ϶ÁÈ¡(r)¡¢Ð´Èë(w)¡¢Ö´ÐÐ(x)ÏàÓ¦µÄÊý×Ö±àºÅ£¬ÈçÏÂͼËùʾ
Èç¹ûÄã¼ÇסÁËÉÏͼËùʾµÄÊý×ֺͶÔÓ¦µÄȨÏÞ¾ÍÍùϱ߿´
¸Õ²ÅÒѾ˵¹ýÁË£¬[No]²ÎÊý ÊÇÈýλ´ú±íÏàӦȨÏÞµÄÊý×Ö¡£´Ó×óÏòÓÒ£¬µÚһλÊýѧ´ú±íÎļþÓµÓÐÕß(u)µÄȨÏÞ¡¢Èº×é(g)µÄȨÏÞ¡¢ÆäËû(o)µÄȨÏÞ¡£Ã¿Ò»¸öÊý×־ͶÔÓ¦¸Ã¼¶Óû§ÓµÓеÄȨÏÞ¼´ÎªrwxÏàÓ¦µÄÊý×ÖÖ®ºÍ¡£ÕâÑù˵¿ÉÄÜ´ó¼Ò²»ÊǺÜÃ÷°×£¬ÎÒ»ÁËÒ»Õűí°ïÖú´ó¼ÒÁ˽â
ÈçÉÏͼ¿ÉÒÔ¿´³öÀ´Èç¹ûÊÇË
Ïà¹ØÎĵµ£º
²Ù×÷ϵͳµÄÒ»¸ö¾µäÎÊÌâÊÇ"Éú²úÕß-Ïû·ÑÕß"ÎÊÌâ, ÕâÉ漰ͬ²½ÐźÅÁ¿ºÍ»¥³âÐźÅÁ¿µÄÓ¦ÓÃ, ÔÚÕâÀï,ÎÒÓÃÏ̵߳Äͬ²½ºÍ»¥³âÀ´ÊµÏÖ.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#define N 2 // Ïû·ÑÕß» ......
Ãû³Æ ĬÈ϶¯×÷ ˵Ã÷
SIGHUP ÖÕÖ¹½ø³Ì ÖÕ¶ËÏß·¹Ò¶Ï
SIGINT ÖÕÖ¹½ø³Ì ÖжϽø³Ì
SIGQUIT ½¨Á¢COREÎļþ ÖÕÖ¹½ø³Ì£¬²¢ÇÒÉú³ÉcoreÎļþ
SIGILL ......
Load Bios
Read MBR's config to find out the os
Load the kernel of the os
init Process starts
execute /etc/rc.d /sysinit
start other modules (etc/modules.conf)
execute the run level scripts
execute /etc/rc.d/rc.local
execute /bin/login
shell started
......
system-config-printer ͼÐνçÃæÉèÖôòÓ¡»ú
BSD(FreeBSD)/System V
lpr/lp ´òÓ¡ÎļþÃû ´òÓ¡
lpr -P´òÓ¡»úÃû ´òÓ¡ÎļþÃû
lp &nb ......