tar cvf filename.tar file
tar cjvf filename.tar.bz2 file
find . -type f #只找出文件 f:文件, d:目录,l: link
-n # 显示行号
-v #不匹配这个模式的
-A #后面多少行
-B #前面多少行
ack:
ack pattern #匹配当前目录下文件内容
ack --perl pattern #只匹配perl文件, 还支持python, shell, ruby, php等
ack '(Mr|Mr?s)\. (Smith|Jones)' --output='$&' #格式输出
ack 大部分参数和grep一样
linux命令之declare
declare
typeset #the alias name of declare
declare -p # show all var
declare -p var #show the var
declare var=value # the same with var=value
declare -i var #the var is integer
declare -r var #the var is read only
declare -a var #the var is array
declare -f # show all function include name and body
declare -F # shwo all function name
declare -f func #show the func
declare -x var # set the var into env
declare -x var=value # set env
linux命令之perror
perror errno # show the mean of errno, eg. perror 1 /* Operation not permitted */
pstree #查看进程关系