DOS ºÍ Linux ³£ÓÃÃüÁîµÄ¶Ô±È
Ðí¶àÔÚ shell ÌáʾϼüÈëµÄ Linux ÃüÁÓëÄãÔÚ DOS ϼüÈëµÄÃüÁîÏàËÆ¡£ÊÂʵÉÏ£¬Ä³Ð©ÃüÁîÍêÈ«Ïàͬ¡£
±¾¸½Â¼ÌṩÁË Windows µÄ DOS Ìáʾϵij£ÓÃÃüÁîÒÔ¼°ÔÚ Linux ÖÐÓëËüÃǵÈͬµÄÃüÁî¡£¸½Â¼Öл¹ÌṩÁËÈçºÎÔÚ Linux shell ÌáʾÏÂʹÓÃÕâЩÃüÁîµÄ¼òµ¥ÊµÀý¡£Çë×¢Ò⣬ÕâЩÃüÁîͨ³£ÓÐÐí¶àÑ¡ÏҪ½øÒ»²½Ñ§Ï°Ã¿Ò»¸öÃüÁÇëÔĶÁÏà¹ØµÄ˵Ã÷Ê飨man£©Ò³£¨ÀýÈ磬ÔÚ shell ÌáʾϼüÈë man ls ¾Í¿ÉÒÔ¶Áµ½¹ØÓÚ ls ÃüÁîµÄÐÅÏ¢£©¡£
ÃüÁîµÄÄ¿µÄMS-DOSLinuxLinux µÄ¼òµ¥ÊµÀý
¸´ÖÆÎļþ
copy
cp
cp thisfile.txt /home/thisdirectory
תÒÆÎļþ
move
mv
mv thisfile.txt /home/thisdirectory
ÁоÙÎļþ
dir
ls
ls
Çå³ýÆÁÄ»
cls
clear
clear
¹Ø±Õ shell Ìáʾ
exit
exit
exit
ÏÔʾ»òÉèÖÃÈÕÆÚ
date
date
date
ɾ³ýÎļþ
del
rm
rm thisfile.txt
°ÑÊä³ö“»ØÏ씵½ÆÁÄ»ÉÏ
echo
echo
echo this message
Óüòµ¥Îı¾±à¼Æ÷À´±à¼Îļþ
edit
gedit([a])
gedit thisfile.txt
±È½ÏÎļþÄÚÈÝ
fc
diff
diff file1 file2
ÔÚÎļþÖÐÑ°ÕÒ×Ö´®
find
grep
grep ´Ê»ò´Ê×é thisfile.txt
¸ñʽ»¯ÈíÅÌ
format a:£¨Èç¹ûÈíÅÌÊÇÔÚ A: ÖеĻ°£©
mke2fs »ò mformat£¨[b]£©
/sbin/mke2fs /dev/fd0£¨/dev/fd0 ÊÇ Linux ÖÐÓë A: µÈͬµÄÇý¶¯Æ÷£©
ÏÔʾÃüÁî°ïÖú
ÃüÁî /?
man£¨[c]£©
man ÃüÁî
´´½¨Ä¿Â¼
mkdir
mkdir
mkdir Ŀ¼
²é¿´Îļþ
more
less£¨[d]£©
less thisfile.txt
ÖØÐÂÃüÃûÎļþ
ren
mv£¨[e]£©
mv thisfile.txt thatfile.txt
ÏÔʾÄãÔÚÎļþϵͳÖеÄλÖÃ
chdir
pwd
pwd
ÓÃÖ¸¶¨µÄ·¾¶£¨¾ø¶Ô·¾¶£¬absolute path£©À´¸Ä»»Ä¿Â¼
cd ·¾¶Ãû
cd ·¾¶Ãû
cd /directory/directory
ÓÃÒ»¸öÏà¶Ô·¾¶£¨relative path£©À´¸Ä»»Ä¿Â¼
cd ..
cd ..
cd ..
ÏÔʾʱ¼ä
time
date
date
ÏÔʾÒѱ»Ê¹ÓõÄÄÚ´æÊýÁ¿
mem
free
free
×¢:
a. Gedit ÊÇͼÐλ¯Îı¾±à¼Æ÷£»Äã¿ÉÒÔʹÓÃÆäËüÎı¾±à¼Æ÷À´´úÌæ Gedit£¬°üÀ¨ Emacs ºÍ vi¡£
b. Õâ¸öÃüÁîΪ DOS Îļþϵͳ¸ñʽ»¯ÈíÅÌ¡£
c. ijЩÃüÁîÄ㻹 ¿ÉÒÔʹÓà info¡£
d. more ·ÖÒ³Æ÷Ò²¿ÉÒÔÓÃÀ´Ò»¸öÆÁĻһ¸öÆÁÄ»µØÔÚÎļþÖÐÖðÒ³²é¿´¡£
e. mv ÃüÁî¿ÉÒÔתÒÆÎļþ»òÖØÐÂÃüÃûÔÚͬһĿ¼ÏµÄÎļþ¡£Èç¹ûÄãÏëÖØÐÂÃüÃûÎļþ£¬ÈçÀýÖÐËùʾ£¬°ÑÕâ¸öÎļþ“תÒÆ”µ½Í¬Ò»Ä¿Â¼ÖеÄÐÂÃû³Æ¡£
Ïà¹ØÎĵµ£º
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
Linux
Ô×Ó²Ù×÷µÄ·ÖÎö
±¾ÎÄÕë¶ÔLinuxÌṩµÄÔ×Ó²Ù×÷º¯Êý
atomic_dec_and_test
×öÁËÏêϸµÄʵÀý·ÖÎö£¬½âÊÍÁËÆäÔ×ÓÐԵı¾ÖÊÒâÒå¡£
²¢¶Ô
volatile
²úÉúµÄÎó½â×öÁ˽âÊÍ¡£
1.
atomic_dec_and_test
·ÖÎö
£¨
1
£©ÏÈÀ´¿´
atomic_dec_and_test
µÄ¶¨Ò壺
11 #ifdef CONFIG_SMP
12 #def ......
ÔÚlinuxÏÂÃ濪·¢c++µÄÓ¦ÓóÌÐò£¬Ê¹ÓÃstlµÄ¿â£¬·¢ÏÖ»¹ÊDz»ÊǺܷ½±ã£¬ÓÈÆäÊÇÆäµ÷ÊÔÆ÷¡£
ʹÓõÄÊÇkdevelop¼¯³É»·¾³£¬±à±à´úÂ뻹Ëã·½±ã£¬±àÒëÒ²ÐУ¬µ«Êǵ÷ÊԵĻ°¸Ð¾õÌر𲻷½±ã¡£Ëüµ÷ÓÃÁËgdb£¬µ«ÊÇΪÁ˵÷ÊÔ·½±ã×Ô¼ºÓÖ¼ÓÁ˺Ü
¶à¶îÍâµÄÃüÁîµ¼ÖºܶàÐÅÏ¢»á¿´²»µ½¡£×Ô¼ºÒ»Ö±ÓÃgdb£¬ÓÐÈËÓÃddd£¬ºóÕßÒ²Êǵ÷ÓÃgdb£¬µ«ÊÇ·¢ÏÖÈ ......
»·¾³±äÁ¿:
export P4PASSWD=abcdefg
export P4CLIENT=dyoldfish.com //Õâ¸ö¿ÉÒÔ²»Éè
export P4USER=dyoldfish
export P4PORT=192.168.1.198:1666
ÃüÁ
1¡¢p4 client #ÅäÖñ¾µØÐÅÏ¢£¬ÎļþÏÂÔØÔÚÄÄÀïÔÚÕâÀïÃæÅäÖã¬RootÏî
2¡¢p4 sync #´Óperforce ÏÂÔØÎļþ
3¡¢p4 login& ......