LinuxÏà¹ØÃüÁһ£©
linuxÃüÁî´óÈ« cat cd
chmod chown
cp cut
Ãû³Æ£ºcat
ʹÓÃȨÏÞ£ºËùÓÐʹÓÃÕß
ʹÓ÷½Ê½£ºcat [-AbeEnstTuv] [--help] [--version] fileName
˵Ã÷£º°Ñµµ°¸´®Á¬½Óºó´«µ½»ù±¾Êä³ö£¨Ó©Ä»»ò¼Ó > fileName µ½ÁíÒ»¸öµµ°¸£©
²ÎÊý£º
-n »ò --number ÓÉ 1 ¿ªÊ¼¶ÔËùÓÐÊä³öµÄÐÐÊý±àºÅ
-b »ò --number-nonblank ºÍ -n ÏàËÆ£¬Ö»²»¹ý¶ÔÓÚ¿Õ°×Ðв»±àºÅ
-s »ò --squeeze-blank µ±Óöµ½ÓÐÁ¬ÐøÁ½ÐÐÒÔÉϵĿհ×ÐУ¬¾Í´ú»»ÎªÒ»ÐеĿհ×ÐÐ
-v »ò --show-nonprinting
·¶Àý£º
cat -n textfile1 > textfile2 °Ñ textfile1 µÄµµ°¸ÄÚÈݼÓÉÏÐкźóÊäÈë textfile2 Õâ¸öµµ°¸Àï
cat -b textfile1 textfile2 >> textfile3 °Ñ textfile1 ºÍ textfile2 µÄµµ°¸ÄÚÈݼÓÉÏÐкţ¨¿Õ°×Ðв»¼Ó£©Ö®ºó½«ÄÚÈݸ½¼Óµ½ textfile3
Ãû³Æ : cd
ʹÓÃȨÏÞ : ËùÓÐʹÓÃÕß
ʹÓ÷½Ê½ : cd [dirName]
˵Ã÷ : ±ä»»¹¤×÷Ŀ¼ÖÁ dirName¡£ ÆäÖÐ dirName ±íʾ·¨¿ÉΪ¾ø¶Ô·¾¶»òÏà¶Ô·¾¶¡£ÈôĿ¼Ãû³ÆÊ¡ÂÔ£¬Ôò±ä»»ÖÁʹÓÃÕßµÄ home directory (Ò²¾ÍÊÇ¸Õ login ʱËùÔÚµÄĿ¼)¡£
ÁíÍ⣬"~" Ò²±íʾΪ home directory µÄÒâ˼£¬"." ÔòÊDZíʾĿǰËùÔÚµÄĿ¼£¬".." Ôò±íʾĿǰĿ¼λÖõÄÉÏÒ»²ãĿ¼¡£
·¶Àý : Ìøµ½ /usr/bin/ :
cd /usr/bin
Ìøµ½×Ô¼ºµÄ home directory :
cd ~
Ìøµ½Ä¿Ç°Ä¿Â¼µÄÉÏÉÏÁ½²ã :
cd ../..
¡¡
Ö¸ÁîÃû³Æ : chmod
ʹÓÃȨÏÞ : ËùÓÐʹÓÃÕß
ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸´æȡȨÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓà chmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËù´æÈ¡¡£
°Ñ¼Æ :
mode : ȨÏÞÉ趨×Ö´®£¬¸ñʽÈçÏ : [ugoa...][+-=][rwxX]...][,...]£¬ÆäÖÐu ±íʾ¸Ãµµ°¸µÄÓµÓÐÕߣ¬g ±íʾÓë¸Ãµµ°¸µÄÓµÓÐÕßÊôÓÚͬһ¸öȺÌå(group)Õߣ¬o ±íʾÆäËûÒÔÍâµÄÈË£¬a ±íʾÕâÈýÕß½ÔÊÇ¡£
+ ±íʾÔö¼ÓȨÏÞ¡¢- ±íʾȡÏûȨÏÞ¡¢= ±íʾΨһÉ趨ȨÏÞ¡£
r ±íʾ¿É¶ÁÈ¡£¬w ±íʾ¿ÉдÈ룬x ±íʾ¿ÉÖ´ÐУ¬X ±íʾֻÓе±¸Ãµµ°¸ÊǸö×ÓĿ¼»òÕ߸õµ°¸ÒѾ±»É趨¹ýΪ¿ÉÖ´ÐС£
-c : Èô¸Ãµµ°¸È¨ÏÞȷʵÒѾ¸ü¸Ä£¬²ÅÏÔʾÆä¸ü¸Ä¶¯×÷
-f : Èô¸Ãµµ°¸È¨ÏÞÎÞ·¨±»¸ü¸ÄÒ²²»ÒªÏÔʾ´íÎóѶϢ
-v : ÏÔʾȨÏÞ±ä¸üµÄÏêϸ×ÊÁÏ
-R : ¶ÔĿǰĿ¼ÏµÄËùÓеµ°¸Óë×ÓĿ¼½øÐÐÏàͬµÄȨÏÞ±ä¸ü(¼´ÒԵݻصķ½Ê½Öð¸ö±ä¸ü)
--help : ÏÔʾ¸¨Öú˵Ã÷
--version : ÏÔʾ°æ±¾
·¶Àý :½«µµ°¸ file1.txt ÉèΪËùÓÐÈ˽ԿɶÁÈ¡ :
chmod ugo+r fil
Ïà¹ØÎĵµ£º
Ò»¡¢Linux device driver µÄ¸ÅÄî
ϵͳµ÷ÓÃÊDzÙ×÷ϵͳÄں˺ÍÓ¦ÓóÌÐòÖ®¼äµÄ½Ó¿Ú£¬É豸Çý¶¯³ÌÐòÊDzÙ×÷ϵͳÄں˺ͻúÆ÷Ó²¼þÖ®¼äµÄ½Ó¿Ú¡£É豸Çý¶¯³ÌÐòΪӦÓóÌÐòÆÁ±ÎÁËÓ²¼þµÄϸ½Ú£¬ÕâÑùÔÚÓ¦ÓóÌ
Ðò¿´À´£¬Ó²¼þÉ豸ֻÊÇÒ»¸öÉ豸Îļþ£¬Ó¦ÓóÌÐò¿ÉÒÔÏó²Ù×÷ÆÕͨÎļþÒ»Ñù¶ÔÓ²¼þÉ豸½øÐвÙ×÷¡£Éè±¸Ç ......
ÒÔÇ°×ÜÊÇÒÔΪֻÓÐwindowsÒ»ÖÖ²Ù×÷ϵͳ£¬ºóÀ´Ìý˵ÁËUnix¡¢LinuxºÍMacOSµÈ£¬²ÅÖªµÀÔÀ´²Ù×÷ϵͳµÄÖÖÀ໹ÊÇͦ¶àµÄ¡£ÓùßÁËwindows£¬¾ÍÏëÊÔÏÂÆäËûµÄ²Ù×÷ϵͳ£¬Ïë¿´¿´ÎªÊ²Ã´windows»á½øÈëǧ¼ÒÍò»§£¬¶øLinuxûÓС£ËùÒÔ£¬×òÌ죬»¨ÁË5¿éÇ®£¬×Ô¼º×°Á˸öred hat enterprise Linux server 5.4°æ£¨±¾À´Ï ......
iptablesÊÇÒ»¸ö
Linux
ÏÂÓÅÐãµÄnat+·À»ðǽ¹¤¾ß£¬ÎÒʹÓøù¤¾ßÒԽϵÍÅäÖõĴ«Í³pcÅäÖÃÁËÒ»¸ö
Áé»îÇ¿¾¢µÄ·À»ðǽ+natϵ
ͳ,СÓÐÐĵ㬿´
ÁËÍøÉÏÒ²ÓкܶàÕâ·½ÃæµÄÎÄÕ£¬µ«ÊÇËƺõҪô˵µÄ±È½ÏÉÙ£¬ÒªÃ´¾ÍÊDZȽÏÆ«£¬ÄÚÈݲ»È«£¬ÈÝÒ×Îóµ¼£¬ÎÒÑо¿ÁËÒ»¶Îʱ¼äµÄiptablesͬʱҲÓÃÁ˺ܾã¬ÓеãµÎ
¾Ñ飬дÀ´¹©´ó¼Ò²Î¿¼£¬Í¬Ê±Ò²±¸ ......
1¡¢Í¬ÔËÐл·¾³½»»¥
1.1¡¢ÃüÁîÐÐ
µ±Ò»¸ö³ÌÐò´ÓshellÆô¶¯µÄʱºò£¬Æä²ÎÊýÁбí°üÀ¨³ÌÐòÃû³Æ¼°ËùÓеÄÃüÁîÐвÎÊý
% ls -s /
Æä²ÎÊýÁбí°üº¬ÈýÏ
µÚÒ»ÏîÊdzÌÐòÃû³Æls£¬µÚ¶þÏîºÍµÚÈýÏî·Ö±ðÊÇÁ½¸öÃüÁîÐвÎÊý£¬-sºÍ/
mainº¯Êý¿ÉÒÔͨ¹ýargcºÍargvÁ½¸ö²ÎÊýÀ´·ÃÎÊÃüÁîÐвÎÊýÁÐ±í£ºargcÊÇÃüÁîÐвÎÊýµÄ¸öÊý£¬argvÊÇÃüÁîÐвÎÊý×Ö·û´ ......