Linux——linuxÃüÁ
NO
·ÖÀà
PS1
ÃüÁîÃû
Ó÷¨¼°²ÎÊý
¹¦ÄÜ×¢½â
1
ÏÔʾĿ¼ÐÅÏ¢
#
ls
ls -a
Áгöµ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþ£¬°üÀ¨ÒÔ.Í·µÄÒþº¬Îļþ
#
ls
ls -l»òll
Áгöµ±Ç°Ä¿Â¼ÏÂÎļþµÄÏêϸÐÅÏ¢
#
ls
ls -a
ÏÔʾËùÓÐÎļþ£¬°üº¬Òþ²Ø¡£
#
ls
ls -al
ÏÔʾËùÓÐÎļþµÄÏêϸÐÅÏ¢¡£
2
²é¿´Â·¾¶
#
pwd
pwd
²é¿´µ±Ç°ËùÔÚĿ¼µÄ¾ø¶Ô·¾
3
Ŀ¼Çл»
#
cd
cd ..
»Øµ±Ç°Ä¿Â¼µÄÉÏÒ»¼¶Ä¿Â¼
#
cd
cd -
»ØÉÏÒ»´ÎËùÔÚµÄĿ¼
#
cd
cd -p aa/bb/cc
Ö±½Ó´´½¨¶à¼¶×ÓĿ¼
#
cd
cd ~ »ò cd
»Øµ±Ç°Óû§µÄËÞÖ÷Ŀ¼
#
cd
cd ~̞
»ØÖ¸¶¨Óû§µÄËÞÖ÷Ŀ¼
4
´´½¨Ä¿Â¼
#
mkdir
mkdir Ŀ¼Ãû
´´½¨Ò»¸öĿ¼
#
mkdir
mkdir –p
µÝ¹éʽȥ´´½¨Ò»Ð©Ç¶Ì×Ŀ¼
#
rmdir
Rmdir ¿ÕĿ¼Ãû
ɾ³ýÒ»¸ö¿ÕĿ¼
5
´´½¨Îļþ
#
touch
touch 1.txt
´´½¨Îļþ1.txt
6
ɾ³ý²Ù×÷
#
rm
rm ÎļþÃû ÎļþÃû
ɾ³ýÒ»¸öÎļþ»ò¶à¸öÎļþ
#
rm
rm -rf ·Ç¿ÕĿ¼Ãû
µÝ¹éɾ³ýÒ»¸ö·Ç¿ÕĿ¼ÏµÄÒ»ÇУ¬¼Ó-f²»Ìáʾ
7
²é¿´Îļþ
#
cat
cat ÎļþÃû
Ò»ÆÁ²é¿´ÎļþÄÚÈÝ
#
cat
cat ·¾¶/ÎļþÃû |grep ×Ö·û´®
ÔÚÎļþÖÐÆ¥Åä“×Ö·û´®”
#
more
more ÎļþÃû
·ÖÒ³²é¿´ÎļþÄÚÈÝ
#
less
less ÎļþÃû
¿É¿Ø·ÖÒ³²é¿´ÎļþÄÚÈÝ
#
grep
grep×Ö·û ÎļþÃû
¸ù¾Ý×Ö·ûÆ¥ÅäÀ´²é¿´Îļþ²¿·ÖÄÚÈÝ
#
find
find ·¾ -name "×Ö·û´®"
²éÕÒ·¾ËùÔÚ·¶Î§ÄÚÂú×ã×Ö·û´®Æ¥ÅäµÄÎļþºÍĿ¼
#
file
file ÎļþÃû
²é¿´ÎļþÀàÐÍ
#
head
head -Êý×Ö ÎļþÃû
¿ÉÒԲ鿴ǰnÐУ¬²»¼Ó²ÎÊý£¬Ä¬ÈÏΪ10.
#
taill
taill -Êý×Ö ÎļþÃû
¿ÉÒԲ鿴ºónÐУ¬²»¼Ó²ÎÊý£¬Ä¬ÈÏΪ10.
8
²é¿´°ïÖú
#
help cp
²é¿´ÄÚ²¿ÃüÁîcp
#
ls --help |less
²é¿´ÍⲿÃüÁ·ÖÆÁÏÔʾ
#
man cd
²é¿´cd°ïÖú
²»·ÖÄÚ²¿ÓëÍⲿÃüÁî
#
info ls
²é¿´ ls ÐÅÏ¢
9
¸´ÖÆÎļþ
#
cp
cp /·¾/Îļþ ./
Òƶ¯¾ø¶Ô·¾ÏµÄÎļþµ½µ±Ç°Ä¿Â¼ÏÂ
#
cp /dev/cdrom linux4.iso
ÔÚ×Ö·û½çÃæÉÏÖÆ×÷ISO¾µÏñÎļþ
10
Òƶ¯Îļþ
#
mv
mv ·¾/Îļþ /¾/Îļþ
Òƶ¯Ïà¶Ô·¾ÏµÄÎļþµ½¾ø¶Ô·¾ÏÂ
Ïà¹ØÎĵµ£º
¼¶±ð£º ³õ¼¶
Ñî ¾ (cdlyangj@cn.ibm.com), Èí¼þ¹¤³Ìʦ, IBM
2008 Äê 11 ÔÂ 27 ÈÕ
ÈçºÎ¶¨Î»Ó¦ÓóÌÐò¿ª·¢ÖеÄÄÚ´æÎÊÌ⣬һֱÊÇ inux Ó¦ÓóÌÐò¿ª·¢ÖеÄÆ¿¾±ËùÔÚ¡£ÓÐÒ»¿î·Ç³£ÓÅÐãµÄ linux Ï¿ªÔ´µÄÄÚ´æÎÊÌâ¼ì²â¹¤¾ß£ºvalgrind£¬Äܹ»¼«´óµÄ°ïÖúÄã½â¾öÉÏÊöÎÊÌâ¡£ÕÆÎÕ valgrind µÄʹÓÃÒÔ¼°¹ ......
½ñÌìfedora¹ÒÁË£¬ÎªÁ˱¸·ÝÊý¾ÝÓÃubuntuµÄlivecdÀ´½øÐÐÊý¾Ý±¸·Ý£¬´ÓÍøÉÏ¿´µ½ÁËһƪÌû×Ó£¬
http://www.linux-sxs.org/storage/fedora2ubuntu.html
½â¾öÁËÎÊÌâ
ÄÚÈÝÈçÏ£º
Boot Ubuntu.
Install lvm2:
$ sudo apt-get install lvm2
Load the necessary module(s):
$ sudo modprobe dm-mod
Scan your system for LVM v ......
ÒÔÏÂÔÚcentos5.3ÉÏʵÑé¡£ÔÚlinuxÖÐsignalº¯ÊýÊÇͨ¹ýµ÷ÓÃsigactionÀ´ÊµÏֵģ¬ÓÉ´ËËü²»´æÔÚÐźŶªÊ§ÒÔ¼°Ã¿´ÎÐźŴ¦Àíºó»á°ÑÐźŴ¦Àí¸Ä³ÉĬÈÏ´¦Àí·½Ê½¡£µ«¶ÔÓÚϵͳµ÷Óú¯Êý±»ÐźŴò¶Ïʱ£¬ÏµÍ³µ÷ÓÃÊÇ·ñ»á×Ô¶¯Æô¶¯ºÃÏñûÔõô˵Ã÷¡£²»¹ý¿ÉÒÔ×Ô¼º¶¯ÊÖ¿´Ò»Ï£º
signal(SIGTERM, term_handle ......
NFSÍøÂçÎļþϵͳÊÇͨ¹ýÎļþϵͳʵÏÖ×ÊÔ´¹²ÏíµÄÒ»ÖÖ×îÖØÒªµÄ·½Ê½¡£
c/s ¿Í»§»ú ·þÎñÆ÷
B/S ä¯ÀÀÆ÷ ·þÎñÆ÷
NFS·þÎñ¶ËÅäÖãº
±à¼/etc/exportsÎļþÒÔÅäÖÿª·Å·¾¶¡£/home/share 192.168.0.123£¨ro£©/(rw).
/etc/init.d/portmap restart
/etc/init.d/nfs&nb ......
¡¡¡¡ls
¡¡¡¡ls ÃüÁî¿ÉÒÔ˵ÊÇlinuxÏÂ×î³£ÓõÄÃüÁîÖ®Ò»¡£ËüÓÐÖÚ¶àµÄÑ¡ÏÆäÖÐÓкܶàÊǺÜÓÐÓõģ¬ÄãÊÇ·ñÊìϤÄØ£¿ÏÂÃæÁгöÁË ls ÃüÁîµÄ¾ø´ó¶àÊýÑ¡Ïî¡£
¡¡¡¡-a ÁгöĿ¼ÏµÄËùÓÐÎļþ£¬°üÀ¨ÒÔ . ¿ªÍ·µÄÒþº¬Îļþ¡£
¡¡¡¡-b °ÑÎļþÃûÖв»¿ÉÊä³öµÄ×Ö·ûÓ÷´Ð±¸Ü¼Ó×Ö·û±àºÅ(¾ÍÏóÔÚCÓïÑÔÀïÒ»Ñù)µÄÐÎʽÁгö¡£
¡¡¡¡-c Êä³öÎļþµÄ i ½Ú ......