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

Äñ¸çLinux£¨¶þ£©

c[tab][tab]: »ñµÃÒÔc¿ªÍ·µÄshellÃüÁî
alias lm='ls -al' £º È¡±ðÃû
unalias
type [cmd] : ÅжÏÊÇbashÄÚ½¨»¹ÊÇ·ÇÄÚ½¨µÄcmd
":Ë«ÒýºÅÄÚµÄÌØÊâ×Ö·û¿ÉÒÔ±£ÓбäÁ¿ÌØÐÔ
':µ¥ÒýºÅÄÚµÄÌØÊâ×Ö·û¾¡ÎªÒ»°ãµÄ×Ö·û
unset ±äÁ¿Ãû£ºÈ¡Ïû±äÁ¿Ãû
$HOME
$PATH
$SHELL
$MAIL
$LANG
$RANDOM
$HSITSIZE
$ENV
env: Áгöµ±Ç°shellÏÂËùÓл·¾³±äÁ¿ÓëÆäÄÚÈÝ
set£ºÖ»ÔÚµ±Ç°shellÏÂÓÐЧµÄһЩ±äÁ¿
export ±äÁ¿Ãû:µ¼³öÒ»¸ö±äÁ¿
$£º±¾shellµÄid
£¿£ºÉÏÒ»¸öcommandÖ´Ðеķµ»ØÖµ£¨ÖØÒª£©
locale -a£º²é¿´µ±Ç°Ö§³ÖµÄ±àÂëÀàÐÍ
read£º¶ÁÈ¡À´×Ô¼üÅ̵ıäÁ¿
Êý×飺var[INDEX]=content
~./xxx:~´ú±íhomeĿ¼£¬./´ú±íµ±Ç°Ä¿Â¼
ÍòÓÃ×Ö·ûÓëÌØÊâ·ûºÅ£º
* - 0»ò¶à¸ö×Ö·û
£¿- 1¸ö
# - ×¢ÊÍ
\ - ÌøÍÑ·ûºÅ
| - ·Ö¸ôÁ½¸ö¹ÜÏßÃüÁîµÄ½ç¶¨
; - ·Ö¸ôÁ½¸öÁ¬ÐøµÄÃüÁî
~ - homeĿ¼
$ - ±êÖ¾±äÁ¿
& - ½«Ö¸ÁîÔÚºǫ́¹¤×÷
! - ·Ç
/ - ·¾¶·Ö¸ô
>,>> - Êä³öµ¼Ïò£¬·Ö±ðÊÇ"È¡´ú"ºÍ"ÀÛ¼Ó"µÄÒâ˼
' - µ¥ÒýºÅ£¬²»½»ÓѱäÁ¿Öû»µÄ¹¦ÄÜ
" - ¾ßÓбäÁ¿Öû»µÄ¹¦ÄÜ
() - ÔÚÖмäΪ×ÓshellµÄÆðʼÓë½áÊø
[] - ÔÚÖмäλ×Ö·ûµÄ×éºÏ
{} - ÔÚÖмäλÃüÁîÇø¿éµÄ×éºÏ
Ctrl-C - ÖÕÓÚµ±Ç°µÄÃüÁî
Ctrl-D - ÊäÈë½áÊø£¨EOF£©
Ctrl-M - »Ø³µ
Ctrl-S - ÔÝÍ£ÆÁÄ»µÄÊä³ö
Ctrl-Q - »Ö¸´ÆÁÄ»µÄÊä³ö
Ctrl-U - ɾ³ýÕûÐÐ
Ctrl-Z - ¡¾ÔÝÍ£¡¿Ä¿Ç°µÄÃüÁî
Êý¾ÝÁ÷Öض¨Ïò£º
1.±ê×¼ÊäÈ루stdin£©£¬< »ò <<, ֵΪ0
2.±ê×¼Êä³ö£¨stdout£©£¬>»ò >>£¬ÖµÎª1
3.±ê×¼´íÎó£¨stderr£©£¬2>»ò2>>£¬ÖµÎª2
ʹÓÃ<<»ò>>»ò2>>£¬»áдÔÚÎļþµÄ½á⣬²»»á¸²¸ÇÔ­À´µÄÎļþ
½«ÕýÈ·ºÍ·ÇÕýÈ·µÄÄÚÈÝ·Ö±ðдÈëÁ½¸öÎļþ£º
> file1 2> file2
Ö»Òª´íÎóµÄÄÚÈÝ
2> file > /dev/null
½«ÕýÈ·ºÍ·ÇÕýÈ·µÄÄÚÈÝ·Ö±ðдÈëͬһ¸öÎļþ£º
> file1 2>&1
¹ÜÏߣ¨pipe£©£ºÓÃ|±íʾ£¬½öÄÜ´¦ÀíÓÉÇ°Ò»¸öÃüÁî´«À´µÄstdoutÊý¾Ý
cut£¨ÒÔÐÐΪµ¥Î»£©£º
cut -d '·Ö¸ô×Ö·û' -f fields
cut -c ×Ö·ûÇø¼ä
-d Ö¸¶¨·Ö¸ô×Ö·û Óë-fÒ»ÆðʹÓÃ
-f Ö¸¶¨·Ö¸îºóÈ¡µÚ¼¸¶Î£¬Ò²¿ÉÒÔÊÇÒ»¸öÇø¼ä
-c ÒÔ×Ö·û£¨character£©Îªµ¥Î»È¡³ö¹Ì¶¨×Ö·ûÇø¼ä
grep:ÏÔʾһÐÐÈç¹ûÓÐÎÒÃÇÐèÒªµÄÐÅÏ¢
grep [-acinv] 'search word' filename
-a ½«binaryÎļþÒÔtextÎļþµÄ·½Ê½ËÑË÷Êý¾Ý
-c ¼ÆËãÕÒµ½µÄ´ÎÊý
-i ºöÂÔ´óСд
-n Êä³öÐкÅ
-v ·´Ïò£¬ÕÒ³öûÓÐÐèÒªËÑË÷×Ö·û´®


Ïà¹ØÎĵµ£º

linux mysql ¿ª·¢»·¾³

°²×°mysql
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
ÏÂÔØ°²×°¹ý³ÌÖУ¬»áÌáʾÊäÈërootÃÜÂë
°²×°CÓïÑÔ±à³Ì½Ó¿Ú£º
 sudo apt-get install libmysqlclient15-dev
¸ü¶àapi ²é¿´£ºhttp://dev.mysql.com/doc/refman/5.0/en/c.html
Ïà¹ØmysqlÍ·ÎļþºÍ¿âÎļþ°²×°ÔÚ/usr/include/mysql/ºÍ/usr/lib/mysqlÄ¿ ......

Mysql for linux mysql×Ô¶¯±¸·Ý½Å±¾

¿ÉÒÔ½«Õâ¸ö½Å±¾·Å½øcrontab£¬ËûµÄÅäÖÆÎļþÔÚ /etc/crontabÖÐÿÌìÁ賿ִÐÐÒ»´Î£¬×Ô¶¯±¸·Ý Õâ¸ö½Å±¾Ã¿Ìì×î¶àÖ»Ö´ÐÐÒ»´Î£¬¶øÇÒÖ»±£Áô×î½üÎåÌìµÄ±¸·ÝÔÚ·þÎñÆ÷ÉÏ¡£
#!/bin/bash
#This is a ShellScript For Auto DB Backup
#Powered by aspbiz
#2004-09
#Setting
#ÉèÖÃÊý¾Ý¿âÃû£¬Êý¾Ý¿âµÇ¼Ãû£¬ÃÜÂ룬±¸·Ý·¾¶£¬ÈÕ־ ......

Linux½ø³Ì¼äͨÐŵĸ÷ÖÖ·½Ê½¼°Æä±È½Ï

     ½ø³Ì¼äͨОÍÊÇÔÚ²»Í¬½ø³ÌÖ®¼ä´«²¥»ò½»»»ÐÅÏ¢£¬ÄÇô²»Í¬½ø³ÌÖ®¼ä´æÔÚ×Åʲô˫·½¶¼¿ÉÒÔ·ÃÎʵĽéÖÊÄØ£¿½ø³ÌµÄÓû§¿Õ¼äÊÇ»¥Ïà¶ÀÁ¢µÄ£¬Ò»°ã¶øÑÔÊDz»ÄÜ»¥Ïà·ÃÎʵģ¬Î¨Ò»µÄÀýÍâÊǹ²ÏíÄÚ´æÇø¡£µ«ÊÇ£¬ÏµÍ³¿Õ¼ä
È´ÊÇ“¹«¹²³¡Ëù”£¬ËùÒÔÄÚºËÏÔÈ»¿ÉÒÔÌṩÕâÑùµÄÌõ¼þ¡£³ý´ËÒÔÍ⣬ÄǾÍÊÇË«·½¶¼¿ÉÒÔ·ÃÎʵ ......

Linuxϵͳ¹ÜÀíʵ¼ù(3)£ºGRUBϵͳÒýµ¼ÅäÖÃ

    °²×°ubuntuʱ£¬grubĬÈÏ°²×°ÔÚµÚÒ»¸öÓ²ÅÌ(hd0)µÄmbrÖУ¬Æäʵ¾ÍÊÇ°ÑÒýµ¼Îļþboot.imgдÈëÓ²Å̵Ämbr,µ±È»,Óû§Ò²¿ÉÒÔÑ¡Ôñ²»Ð´ÈëÓ²ÅÌmbr ¶øÊÇдÈëlinux·ÖÇøµÄÒýµ¼ÉÈÇø¡£grubÒÔfd±íʾÈíÅÌ£¬hd±íʾӲÅÌ(°üº¬IDEºÍSCSIÓ²ÅÌ)¡£ÒÔÇ°°æ±¾µÄgrubÆäÉ豸ÊÇ´Ó0¿ªÊ¼±àºÅ,·ÖÇøÒ²ÊÇ´Ó0¿ªÊ¼,Ö÷·ÖÇø´Ó0-3,Âß¼­·ÖÇø´Ó4¿ªÊ¼, ......

[Linux] ³£ÓÃlinuxϵͳÃüÁî

ºÜ¾ÃûÀ´²©¿ÍÁË£¬Õⶼ°Ý¹«Ë¾ÄǿɶñµÄWebsenseËù´Í£¬×î½üʱ³£·¢ÏÖÓÐһЩLinuxÃüÁîĪÃûÆäÃîµÄÍü¼ÇÁË£¬Ò²ÐíÊÇÉÙÓÃÁË£¬»òÕßÊÇÀÏÁË£º£¨ÓÚÊÇÏëµ½Ë÷ÐÔÔÚÕâÀïдһ±ßÎÄռǼһÏ£¬ÒÔ±ãÈÕºó²Î¿¼¡£
1¡¢É¾³ýÂÒÂëÎļþ£º
# ll -i (»ñµÃÎļþ½ÚµãºÅ)
# find ./ -inum ½ÚµãºÅ -print -exec rm {} -rf \; (ÇÉÓÃfindɾ³ý)
2¡¢findÓëxargs½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ