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

ÔõÑù±àдLinux shell script(Ò»)

 ½üÀ´ÕýÔÚѧϰLinux shell script£¬Ö÷ÒªÊÇѧϰLinux Shell Scripting Tutorial (LSST) v1.05r3µÄ¼¸¸öÕ½ڣ¬µ«ÒòΪÊÇÓ¢ÎĵÄËùÒÔÕâÀï°ÑËü·­ÒëÏ£¬Ò²ÊÇ×Ô¼º¼ÓÉîÓ¡Ï󡣺ÃÁËÖ±½Ó½øÈëÖ÷Ìâ¡£
1.How to write shell script £¿
a.Ê×ÏÈÓÃÈκεıàÒëÆ÷£¨vi,vim,kwrite,....£©±àдһ¸öshell script£»
b.È»ºó°´ÕÕÏÂÃæµÄ·½·¨¸øÄã±àÒëµÄshell scriptÌí¼Ó¿ÉÖ´ÐÐÊôÐÔ£»
  chmod  Ìí¼Ó(ɾ³ý)ÊôÐÔ  ÎļþÃû³Æ
ÀýÈ磺
  chmod  +x   your_script_name »òÕß
  chmod  755 your_script_name
Àý×ÓÖеڶþÖз½·¨ÖÐ755±íʾ¶ÔÈý¸ö²»Í¬Àà±ðµÄʹÓÃÕßÉèÖÃÊôÐÔ£¬ÕâÀïÊ×ÏÈ´ó¼ÒÒªÖªµÀLinuxÖеijýÁË¿ÉÒÔÓÃr,w,x±íʾ¿É¶Á£¬¿Éд£¬¿ÉÖ´ÐеÄÊôÐÔÍ⣬»¹¿ÉÒÔÓÃÒ»¸öÊý×Ö´ú±íÒ»ÖÖÊôÐÔ£¬·Ö±ðÊÇr-4,w-2,x-1£¬Ò²¾ÍÊÇ4¾Í±íʾ¿É¶Á£¬2±íʾ¿Éд£¬1±íʾ¿ÉÖ´ÐУ»ÄÇôÈçºÎÉèÖÃÕâЩÊôÐÔÄØ£¿Èç¹ûÎÒÃÇÓ󣹿µÄ·½·¨ÊÇͨ¹ý“+¡¢-”·ûºÅÀ´ÉèÖõģ¬Ò²¾ÍÊÇ"+r"±íʾ¸øÄ³¸öÎļþ¼ÓÉϿɶÁÊôÐÔ£¬"-r"±íʾ¸øÄ³¸öÎļþÈ¥³ý¿É¶ÁÊôÐÔ£»
ÔÚÓÃÊý×Ö±íʾÖÐÊÇÕâÑùÉ趨ÊôÐԵģ¬ÓÃÊý×ÖÉ趨ÊôÐÔ¸ü¼ÓµÄ·½±ã¿ì½Ý£¬Ò»´Î¿ÉÒÔÉ趨Èý¸öÀà±ðʹÓÃÕßµÄÊôÐÔ“ÎļþÓµÓÐÕß”¡¢“ÎļþÓµÓÐÕßËùÔÚµÄ×é³ÉÔ±”¡¢“ÆäËüʹÓÃÕß”£¬ÉÏÃæµÄÀý×ÓÖУ¬7ÊǸøÎļþÓµÓÐÕßÉ趨µÄÊôÐÔ£¬ÄÇ"7"ÊÇʲôÒâË¼ÄØ£¿Æäʵ¾ÍÊǸ÷¸öÊôÐÔÊý×ÖÏà¼ÓµÄ½á¹û£¬Ò²¾ÍÊÇÈç¹ûÄãÒªÉ趨´ËÀàʹÓÃÕßÓÿɶÁ4,¿Éд2,¿ÉÖ´ÐÐ1,ÊôÐÔ£¬ÄÇô¾ÍÊÇ4+2+1 = 7£»´ÏÃ÷µÄÄã¿ÉÄÜÒѾ­ÖªµÀÁËÎļþÓµÓÐÕßËùÔÚµØ×é³ÉÔ±µÄÊôÐÔÊÇ ¿É¶Á ¿ÉÖ´ÐÐ ¼´£º4+1 = 5 £¬ÆäËüʹÓÃÕßµÄÊôÐÔÒ²ÊÇ ¿É¶Á ¿ÉÖ´ÐÐ ¼´£º4+1 = 5. ºÃÁËÊôÐÔÉ趨¾Í²»³¶ÁË£¬¹Ø¼üÊÇÒª¼ÇסchmodÃüÁî¡£
c.±àÒëºÃÁ˽ű¾ÒÔºó¾ÍÊÇÖ´ÐÐÁË
ÕâÀïÌṩÁ½ÖÖ·½·¨Ö´ÐÐÄãµÄ½Å±¾£º
  bash   your_script_name  #ÕâÀïµÄ“#”ºÅÖÐLinux shell scriptÖÐÊDZíʾÆäºóµÄÄÚÈÝΪעÊÍ£»bash ÊÇÎÒÃÇϵͳÖеÄshellÀàÐÍÕâÀï¾Í²»³¶Ô¶ÁË
  ./your_script_name  #½¨Òé´ó¼Ò¾ÍÖ±½ÓÓÓ./”½ÓÄãµÄ½Å±¾Ãû³ÆÖ´ÐУ¬ÎªÊ²Ã´²»ÄÜÏñWindowsÒ»ÑùÖ±½ÓÊäÎļþÃûÖ´ÐÐÄØ£¿Õâ¸öÎÊÌâÇë×Ô¼ºÕÒ´ð°¸
ºÃÁË£¬ÎÒÃÇÏÖÔÚ°ÑÉÏÃæµÄÁ¬¹á×öÒ»±é£»
Ê×ÏȽ¨Á¢Ò»¸ö½Å±¾£¬ÎÒÔÚÕâÀïʹÓÃvi±àÒëÆ÷¡£
$ vi first
ÄÚÈÝÈçÏ£º
#
# My first shell script
#
clear
echo "Knowledge is Power"
±£´æÍ˳ö£»
È»ºóÌí¼Ó¿ÉÖ´ÐÐÊôÐÔ£»
$ chmod 755 first
×îºóÖ´ÐÐ
$ ./fi


Ïà¹ØÎĵµ£º

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâÆª·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´Ë×ªÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨ÕâÆª²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

[תÌû]LinuxÇý¶¯¿ª·¢Ñ§Ï°µÄһЩ±ØÒª²½Öè

 1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......

Linux µÄÎļþϵͳ

Linux Ê×ÏÈ´´½¨ramfsÎļþϵͳ(/)
È»ºó°Ñinitrd.imgÎļþ¼ÓÔØµ½ / Ŀ¼Ï¡£
ÆäËüÎļþϵͳÊÇ×öΪramfsµÄÒ»¸öĿ¼½áµã¹ÒÔØÉÏÈ¥µÄ¡£
initrd.imgÊÇÒ»¸öÓÃzipѹËõµÄcpio¸ñʽµÄѹËõÎļþ¡£°´ÏÂÃæ²½ÖèʵÏÖ½âѹ
µÚÒ»²½£º½«initrd.img¸ÄÃûΪinitrd.img.gz
mv initrd.img initrd.img.gz
µÚ¶þ²½£ºÓÃgunzip½âѹÉú³Éinitrd.img
gunzi ......

Linux·þÎñcannot change directory´íÎó½â¾ö·½·¨

Linux·þÎñcannot change directory´íÎó½â¾ö·½·¨
ÔÚ°²×°Íêvsftp·þÎñºóµÇ½ʱ¿ÉÄÜÓöµ½cannot change directoryºóÃæÊǵǽÕßµÄĿ¼µÄ´íÎó¡£ÕâÊÇÒòΪSEÉèÖõĹرÕÁËftpµÄÔ­Òò¡£
ʹÓÃÃüÁî
getsebool ftpd_disable_trans
¿ÉÒԲ鿴µ±Ç°µÄ״̬Èç¹û²»ÊÇon
ÄÇôÊÇÊäÈëÃüÁî
setsebool ftpd_disable_trans 1
µ±È»Ò²¿ÉÒÔ¼ÓÈë-P² ......

linuxÄÚºË(2.6)ÖеÄ˫ѭ»·Á´±ídzÎö

       Linux 2.6ÄÚºËÁ´±íÊý¾Ý½á¹¹µÄʵÏÖ
ÔÚ¼ÆËã»ú¿ÆÑ§ÖУ¬Á´±íÊǷdz£Í¨ÓõÄÊý¾Ý½á¹¹£¬¹á´©ÓÚÕû¸ölinuxµÄÄںˡ£ÔÚlinuxÄÚºËÖУ¬Á´±íͨ³£ÒÔ
˫ѭ»·Á´±íµÄ·½Ê½³öÏÖ¡£ËùÓÐÁ´±íµÄ´úÂëÔÚinclude/linux/list.hÎļþÖС£
¶¨ÒåÈçÏ£º
struct list_head {
struct list_head *next, *prev;
}; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ