1¡¢Äã¿ÉÒÔͬʱ¼üÈëÁ½¸öÃüÁ·½·¨ÊÇÓ÷ֺţ¨£»£©·Ö¸îÁ½¸öÃüÁî¡£
2¡¢mesg n ¾Ü¾øÆäËûÈËwrite µ½ÄãµÄÖնˡ£
mesg y ÔÊÐíÆäËûÈËwrite µ½ÄãµÄÖնˡ£
mesg ±¨¸æÊÇÔÊÐí»òÊDz»ÔÊÐíÆäËûÈËдµ½ÄãµÄÖնˡ£
3¡¢write ÃüÁî
ʹÓÃwrite ÃüÁî¿ÉÒÔÏòµ±Ç°µÇ¼µ½Í¬Ò»¸öϵͳµÄÓû§µÄÖն˷¢ËÍÏûÏ¢¡£
4¡¢clear ÃüÁî
clearÃüÁîÇå³ýÖÕ¶ËÆÁÄ»ÉϵÄ×Ö·û¡£Õâ¸öÃüÁî½ö½öÇå³ýµ±Ç°µÄÆÁÄ»£¬ËùÒÔ£¬Óû§ÓпÉÄÜÏòÉÏ·ÆÁÀ´
²é¿´ÒÔÇ°µÄÆÁÄ»ÐÅÏ¢£¬ÏëÒªÇå³ýËùÓеÄÆÁÄ»ÐÅÏ¢£¬°´HOME ¼ü£¬½«¹â±êÖÁµ½home£¬È»ºó¼üÈëclear
ÃüÁî
5¡¢news ÃüÁî
ϵͳÖеÄËùÓÐÓû§¶¼¸ÐÐËȤµÄÐÅÏ¢¿ÉÒÔͨ¹ýnewsÃüÁî¹ã²¥³öÈ¥¡£
6¡¢UNIXϵͳµÄ¹ßÀý£ºÎÞÂÛºÎʱ£¬¶¼¿ÉÒÔɾ³ýtmpĿ¼ÏµÄÈκÎÎļþ¡£
7µãÖ»ÓÐÒ»µãÌØÊ⣬¾ÍÊÇ×÷Ϊһ¸öÎļþÃûµÄµÚÒ»¸ö×Ö·ûµÄʱºò£¬ÔÚÕâÖÖÇé¿öÏÂËüÖ¸Ã÷ÕâÊÇÒ»¸öÒþ²Ø
Îļþ¡£Äã¿ÉÒÔʹÓÃls -aÀ´ÏÔʾһ¸öÒþ²ØÎļþ¡£µ«ÊÇÔÚaixϵͳÏ£¬ºÃÏñ²»ÊÜ´ËÔ¼Êø£¬ls»áÁгö.¿ª
ʼµÄÎļþ¡£
8¡¢tail--- ÏÔʾÎļþµÄĩβ
tail [-n] [ÎļþÃû]
tailÃüÁîµÄ×÷ÓÃÊÇÏÔʾһ¸öÎļþµÄ×îºó n ÐС££¨×¢ÊÍ£ºÈç¹ûûÓÐÖ¸¶¨£¬n µÄĬÈÏÖµÊÇ10£©£¬Õâ¸ö
ÃüÁî¶ÔÄÇЩÖÜÆÚÐÔÌí¼ÓÐÅÏ¢µÄ³¤µÄÈÕÖ¾ÎļþÌرðÓÐÓá£Ê¹ÓÃtail ÃüÁÄã¿ÉÒÔÖ±½Ó¿´µ½ÒѼǼµÄ
×îºóµÄÐÅÏ¢£¬¶ø²»ÐèÒªÓÃcatºÍmore À´¹ö¶¯Õû¸öÎļþµ½Ä©Î²¡£
9¡¢¹ØÓÚÎļþÁ´½ÓÊý,ÏÂÀý¿ÉÒÔ¿´µ½ÊÇ1£¬Ä¬ÈÏÈκÎÎļþÁ´½ÓÊýΪ1£¬Èç¹û½¨Á¢Ò»¸öÐÂlnÁ´½Ó¡£ÄÇôÕâ
¸öÊý×־ͻáÔö¼Ó1£¬Èç¹ûÕâ¸öÊý×Ö¼õÉÙΪ0£¬ÄÇôÕâ¸öÎļþ¾Í»á±»É¾³ý¡£
$ ls -l f1
-rw-rw-r-- 1 user1 classs 37 Jul 24 11:06 f1
10¡¢ touch £ ¸üÐÂÎļþµÄʱ¼ä±êÖ¾
11¡¢umask±íʾ½¨Á¢ÎļþµÄĬÈÏȨÏÞ£¬Ò²½ÐÑÚÂ룬ËüÒ²¿ÉÒÔʹÓÃ8½øÖÆÊýÀ´±íʾ¡£µ«ÊÇËüµÄ8½øÖÆÊý
¸ú±íʾÎļþȨÏÞ8½øÖÆÊDz»Ò»Ñù¡£±ÈÈç±íʾ111 001 110 Õâ¸öȨÏÞµÄ8½øÖÆÊýÊÇ716£¬¶ø±íʾËüµÄ
umaskÓ¦¸ÃÊÇ061£¬Ò²¾Í¿ÉÒÔÕâôÀí½â£¬È¨ÏÞÖÐ1ÓÐЧ£¬±íʾmaskÊÇ0ÓÐЧ¡£ÉÏÀýÖпÉÒÔÕâÑùÀí½â£¬ÎÄ
¼þȨÏÞÊÇ111 001 110£¬maskÊÇ000 001 001 . ÔÚ¾Ù¸öÀý×Ó$ umask a-rwx,u=rw,g=r Ï൱ÓÚumask
137£¬AIXĬÈÏmaskÊÇ022¡£
12¡¢su - username
һЩÅäÖÃÎļþÊÇΪÄãµÄµÄ¶Ô»°ÏßË÷¶øÉèÁ¢µÄ¡£¡£µ±ÄãʹÓÃÃüÁîsu usernameʱ£¬ÄãµÄ¶Ô»°ÌØÕ÷ºÍÄã
ÔʼµÄµÇ¼Éí·ÝÒ»Ñù¡£Èç¹ûÄãÏëÒªÄãµÄ¶Ô»°½ø³ÌÓµÓÐת»»ºóµÄÓû§IDÒ»ÖµÄÌØÕ÷£¬ÄãҪʹÓöÌб¸Ü
: su - username.Õâ¾ä»°µÄÒâ˼Ӧ¸ÃÊÇÖ¸»·¾³±äÁ¿µÄ±ä»¯°É¡£
13¡¢{} µÄÓ÷¨
È·ÈÏÄãÓÐÒ»¸ö½ÐfileºÍÒ»¸ö½Ðfile1µÄ±äÁ¿¡£Äܹ»Ê¹ÓÃÒÔϵÄÓï¾ä¸øËüÃǸ³Öµ£º
$ file =this
$ file1= that
$echo $fileand$file1 Ñ°ÕÒ±äÁ¿fileand,file1
sh: fileand: parameter not set
$ echo ${file} and $file1 Ñ°ÕÒ±äÁ¿file,file1
thisandthat
»¨À¨ºÅ±»ÓÃÀ´Çø·Ö±äÁ¿ÃûºÍÖÜΧµÄÎı¾¡£
14¡¢ ÃüÁîÌæ´ú
Óï·¨£º$(command)
$ curdir=$(pwd)
$ echo $curdir
/home/user2
ÃüÁîÌæ´úÈÃÄ㲶»ñÒ»¸öÃüÁîµÄÊä³ö£¬ÓÃËü×÷ΪÁíÒ»¸öÃüÁîµÄ²ÎÊý£¬»òÊǸ³Öµ¸øÒ»¸ö±äÁ¿¡£ÏóÔÚ±äÁ¿
Ìæ´úÖÐÒ»Ñù£¬ÃüÁîÌæ´úµÄÖ´ÐÐÊÇÔÚÃüÁîÐпªÊ¼Ö®Ç°Íê³ÉµÄ¡£µ±ÃüÁîÐÐÊä³ö°üº¬»Ø³µ»»ÐУ¬ËüÃǻᱻ
¿Õ¸ñ´úÌæ¡£
15¡¢env ÃüÁîÓÃÀ´ÏÔʾËùÓеĵ±Ç°»·¾³ÖеĶ¨ÒåµÄ±äÁ¿£¬ºÍËüÃǵÄÖµ¡£
set ÃüÁî»áÏÔʾËùÓеĵ±Ç°¶¨ÒåµÄ±äÁ¿£¬±¾µØºÍ»·¾³ÖеıäÁ¿£¬ºÍËüÃǵÄÖµ¡£
unset ÃüÁîÓÃÀ´É¾³ýÖ¸¶¨±äÁ¿µÄµ±Ç°µÄÖµ¡£Õâ¸öÖ¸±»¸³Îª¿ÕÖµ NULL¡£
set ºÍunset ¶¼ÊÇshellÄÚ½¨µÄÃüÁ¶øenv ÊÇUNIXÃüÁî /usr/bin/env.
16¡¢export ±äÁ¿ ´«µÝ±äÁ¿µ½»·¾³
17¡¢ÒýÓÃ
»úÖÆ ¡¡¡¡¡¡¡¡¡¡¡¡Ä¿±ê
·´Ð±¸Ü ¡¡¡¡¡¡¡¡¡¡ºöÂÔÏÂÒ»¸ö×Ö·û
µ¥ÒýºÅ ¡¡¡¡¡¡¡¡¡¡ºöÂÔËùÓеÄÔÚ¡®¡®ÖеÄÌØÊâ×Ö·ûµÄÌØÊ⺬Òå
Ë«ÒýºÅ ¡¡¡¡¡¡¡¡¡¡ºöÂÔËùÓеÄÔÚ¡°¡±ÖеÄÌØÊâ×Ö·ûµÄÌØÊ⺬Ò壬 \, $,{±äÁ¿Ãû}ºÍ$(comand)³ýÍâ
18¡¢$ grep user /etc/passwd£¬ÔÚºóÃæÎļþÖÐËÑÑ°user×Ö¶Î
19¡¢wc [-lwc] [file...] ¼ÆËãÒ»¸öÎļþµÄÐÐÊý£¬µ¥´ÊÊý£¬ºÍ×Ö·ûÊý¡¡
20¡¢ÔÚijЩÇé¿öÏÂÎÒÃÇÐèÒªÖªµÀÔÚij¸öÎļþϵͳÉÏ£¬Ã¿¸öÓû§¸÷Õ¼ÓöàÉÙ´æ´¢¿Õ¼ä¡£Îª´Ë¿ÉÒÔʹÓÃ
quotÃüÁî¡£
¡¡¡¡
21¡¢which ÃüÁî
whichÃüÁîÔÚÔÚÅжϽ«ÒªÊ¹ÓÃÃüÁîµÄÄÄÒ»¸ö°æ±¾Ê±ÌرðÓÐÓá£
whereisÃüÁî
whereis ÃüÁîÔÚÄãÊÕµ½¡°Ã»Óз¢ÏÖ¡±´íÎóÐÅÏ¢µÄʱºòÊ®·ÖÓÐÓá£Ëü»áËÑË÷Ò»¸öÔ¤¶¨ÒåµÄĿ¼ÁÐ±í¡£
ĬÈϵÄÇé¿öÏ£¬whereis»áÈ¥ËÑË÷Ô´³ÌÐò£¬¶þ½øÖÆÎļþ£¬ºÍ°ïÖúÊֲᡣÄã¿ÉÒÔʹÓÃ-bÑ¡ÏîÀ´ÏÞÖÆËü
Ö»ËÑË÷¶þ½øÖÆ´úÂë¡£
×ܽ᣺
whereis ¡¡¡¡¶¨Î»Ô´³ÌÐò£¬¶þ½øÖÆ´úÂ룬ºÍ°ïÖúÊÖ²áµÄλÖÃ
which ¡¡¡¡¡¡ÔÚÄãµÄPATHÖж¨Î»Ò»¸ö¿ÉÖ´ÐÐÎļþ
file ¡¡¡¡¡¡ ÅжÏÎļþµÄÀàÐÍ
22¡¢# ioscan -fun ¡¡¡¡¡¡ÁгöËùÓеÄÉ豸ºÍ¶ÔÓ¦µÄÉ豸ÎļþÃû
# ioscan -fun disk ¡¡ÁгöËùÓеĴÅÅÌÉ豸ºÍÉ豸ÎļþÃû
# ioscan -funC tape ¡¡ÁгöËùÓеĴŴøÉ豸ºÍ´Å´øÉ豸Îļþ
23¡¢Ä¬ÈÏ·ÓÉ¿ÉÒÔʹÓÃrouteÃüÁîÀ´ÅäÖã¨HP-UX£©£º
/usr/sbin/rounte add default 192.6.12.33. 1
hfh08 ÓÚ 2006-08-25 15:27:05·¢±í:
²»´í£¬Ö§³ÖÏÂ