标签:
***************************FIRST PART***********************************
date //date now
date +%Y/%m/%d...%H:%M:%S //date cn time
cal 10 2009
cal //today
bc //ji suan qi
scale=10 //set .3333333333
Ctrl +c Ctrl +d Ctrl +z
man date //date(1):pu tong yonghu ke zhixing shell command (5):peizhiwenjian (8):xi tong guanliyuan shiyongde guanli command
man -f man //find man file
man -k man //find man keyword
sync //tongbu
shutdown -h now
shutdown -h 20:25
shutdown -t 10 //after 10s
shutdown -r now //reboot
ls -al ; ll ; ls -l ;ls -li//inodes
size test //test is a execute file to see data/text/bss block
chgrp groupname filename
chown username filename
chmod 777 filename //user:4 grp:2 others:1
chmod +xrw filename
chmod -xrw filename
echo $PATH
mv filename directoryname //move
cat -n filename //number
tac filename //nixu
head/tail/more/less/hl/od
umask //moren quanxian
umask 022 //quchu w quanxian
chattr +i filename //bu ke gaidong
chattr +a filename //zhi ke jia data
lsattr //ls attr
special quanxian: SUID/SGID/SBIT
file filename //chaxun wenjian leixing
which/whereis/locate/find filename
df -h //disk rongliang
du -a
ln sourcefile targetfile //hard link
ln -s sourcefile targetfile //sympol link
kill -9 %1 ***** //kill vim to recover
tar -jcv -f targetdirname.tar.bz2 filename1 filename2 ... //yasuo bzip2
tar -jtv -f filename.tar.bz2 // chakan
tar -jxv -f filename.tar.bz2 -C target dir // jieya
********************************SECOND PART*******************************
vim filename
:set smartindent
:set nu
58G 40->
gg //first line
G //last line
:50,100s/man/MAN/gc *****//man to MAN
9yy //copy 9 lines
p //paste
22dd //delete 22 lines
:w filename //rename *****
Ctrl +Z // houtai vim
kill -9 %1 ***** //kill vim to recover
.swp //zaicun wenjian *****
u //chexiao
visual block
vim filename1 filename2 //***** duo wen jian bianji
:files
:N
:n //qie huan files
*****
:sp // one file open twice
:sp filename //open another file
:q //exit this file:
*********************************THIRD PART********************************
name="Yanglu‘s name" //ok
name=Yanglu\‘s\ name //ok
PATH="$PATH":/home/dmtsai/bin //tianjia bianliangzhi
erport name //bianliang bianwei huanjinbianliang
bash //can find in child process
exit // exit this child process
unset name // delete this name variable
env //environment list all environment variable
locale -a //file locate /etc/sysconfig/
locale //suo zhichi de suoyou language
alias //minglin bieming
*****
dataflow relocate // shu ju liu chong ding xiang
ll > ./newfilename //stdout 1 > shu ru jing newfile ****fu gai
ll >> ./newfileanme //*** houjiaru
find /home -name .bashrc > list_right 2>list_error
find /home -name .bashrc 2> /dev/null //hole device
find /home -name .bashrc &>list //all data to list
sync ;sync ;shutdown -h now //shunxu zhixing
cmd1 && cmd2
cmd1 || cmd2
****************************FOURTH PART**************************
标签:
原文地址:http://www.cnblogs.com/General-up/p/5402798.html