Äñ¸ç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 ·´Ïò£¬ÕÒ³öûÓÐÐèÒªËÑË÷×Ö·û´®
Ïà¹ØÎĵµ£º
MySQL :: Linux ÏÂ×Ô¶¯±¸·ÝÊý¾Ý¿âµÄ shell ½Å±¾
Linux ·þÎñÆ÷ÉϵijÌÐòÿÌ춼ÔÚ¸üРMySQL Êý¾Ý¿â£¬ÓÚÊǾÍÏëÆðдһ¸ö shell ½Å±¾£¬½áºÏ crontab£¬¶¨Ê±±¸·ÝÊý¾Ý¿â¡£Æäʵ·Ç³£¼òµ¥£¬Ö÷Òª¾ÍÊÇʹÓà MySQL ×Ô´øµÄ mysqldump ÃüÁî¡£
½Å±¾ÄÚÈÝÈçÏ£º
#!/bin/sh
# File: /home/mysql/backup.sh
# Database info
DB_NAME=" ......
1¡¢ÏÂÔØMySQLµÄ°²×°Îļþ
°²×°MySQLÐèÒªÏÂÃæÁ½¸öÎļþ£º
MySQL-server-5.0.46.i386.rpm¡¡¡¡¡¡
MySQL-client-5.0.46.i386.rpm
2¡¢°²×°MySQL
rpmÎļþÊÇRed Hat¹«Ë¾¿ª·¢µÄÈí¼þ°²×°°ü£¬rpm¿ÉÈÃLinuxÔÚ°²×°Èí¼þ°üʱÃâ³ýÐí¶à¸´ÔÓµÄÊÖÐø¡£¸ÃÃüÁîÔÚ°²×°Ê±³£ÓõIJÎÊýÊÇ
ivh
,ÆäÖÐi±íʾ½«°²×°Ö¸¶¨µÄrmpÈí¼þ°ü£¬V±í ......
¿ÉÒÔ½«Õâ¸ö½Å±¾·Å½øcrontab£¬ËûµÄÅäÖÆÎļþÔÚ /etc/crontabÖÐÿÌìÁ賿ִÐÐÒ»´Î£¬×Ô¶¯±¸·Ý Õâ¸ö½Å±¾Ã¿Ìì×î¶àÖ»Ö´ÐÐÒ»´Î£¬¶øÇÒÖ»±£Áô×î½üÎåÌìµÄ±¸·ÝÔÚ·þÎñÆ÷ÉÏ¡£
#!/bin/bash
#This is a ShellScript For Auto DB Backup
#Powered by aspbiz
#2004-09
#Setting
#ÉèÖÃÊý¾Ý¿âÃû£¬Êý¾Ý¿âµÇ¼Ãû£¬ÃÜÂ룬±¸·Ý·¾¶£¬ÈÕ־ ......
ITKÊÇÓÉÃÀ¹úÊý×ÖÈËÏîÄ¿Òý³öµÄÒ»¸ö¸±²úÎµ«ÓÉÓÚÆ俪Դ£¬¿çƽ̨µÄÌص㣬ӦÓ÷¶Î§Öð½¥À©´ó£¬²¢²»¶ÏÍêÉÆ£¬ÔÚҽѧͼÏñ´¦ÀíÖУ¬Õ¼ÓкÜÖØÒªµÄµØλ¡£¸öÈ˸оõ£¬ÉÏÊֱȽÏÄÑ£¬Ò»µ©¿ªÊ¼Ê¹ÓÃÁË£¬¾ÍºÜÈÝÒ×ÁË£¬ÊÖ²áÉϽ²µÄÏ൱Çå³þ¡£
»·¾³£ºITK3.6£¬cmake2.6(´ø¶þ½øÖÆ¿ÉÖ´ÐÐÎļþµÄ)£¬redhat EL AS 4.4
´´½¨Îļþ¼Ð
/opt/itk/src/
£¬
......
Linuxϵͳһ¸öºÜÖØÒªÇÒÇ¿´óµÄÌØÕ÷¾ÍÊÇ£¬ËüÊÇÒ»¸ö¿ª·ÅµÄϵͳ£¬Óû§¿ÉÒÔ×Ô¼ºÅäÖÃÈçºÎÆô¶¯Õâ¸öϵͳ¡£Óû§¿ÉÒÔ×ÔÓÉÅäÖÃϵͳÆô¶¯¹ý³ÌµÄ¸÷¸ö·½Ã棬°üÀ¨ÔÚÆô¶¯Ê±¶¨ÖÆÆô¶¯ÄÇЩӦÓóÌÐò£¬Í¬Ñù£¬¹Ø»úʱҲ¿ÉÒÔ×ÔÓÉÅäÖÃÈçºÎÈ¥¹Ø±Õ¸÷¸ö³ÌÐò£¬²»¹ý¶¨Öƹػú´¦Àí¹ý³ÌÕý³£Çé¿öÏÂÊǼ°ÉÙÓõ½µÄ¡£
Àí½âÈçºÎÆô¶¯¼°¹Ø±ÕÒ»¸ö³ÌÐòµÄ¹¤×÷¹ý³Ì²»½ö½ö¾ ......