linux 笔记201009

   securecrt 快捷键   ALT+1/2/3/4/5.../9 —— 切换到第1/2/3/4/5.../9个标签
不会有乱码的是:fixedsys,新宋体(我还是喜欢用这两个,第一个字体太小,受不了),宋体


个人环境变量都是写在HOME目录的 .profile中
telnet 不退出 profie TMOUT=0
alias l='ls -l'
在shell中设置列宽  stty columns 132
统计文件的个数 ls |wc -l


ps -ef|grep invoice 查找当前运行的发票程序
显示文件夹  ls -a | grep ^d
a="select * from a"
替换  cat a.txt|tr "[a-z]" "[A-Z]"
awk 单引号  find 双引号
ultraedit 换行符  【^P】
批量删除   ls -lrt cicslog*|head -1|awk '{print $9}'|xargs rm
month=`expr 12 + $month`  day=`date +%d`
date +%Y"-"%M"-"%D""%H":"%M":"%S
ls -lrt creat*
vi命令 2dd 删除两行  2yy 复制两行 p 粘贴
awk -F/| '$9!="mbtpOfficial" && $9!="mbtpTest" && $9!="mbtpWork" {print $0}' aaa1.txt >aaa2.txt
find . -name "*$2*"|xargs zgrep $1 >/appdata/inv.txt
多文件查找  find Members/ -type f -print0 | xargs -0 grep "examplestring"
awk -F/|  '{printf("update yjzw.im_pr_noimsirela set stoptime=/0472099-12-31 00:00:00/047 where imsino=/047%s/047 and mobileno=/047%s/047;/n",$1,$2)}' im_pr_noimsirela.lst.00
grep -v "^h[a-z]*"  查询不是以h开头第二位为小写字母的数据

gzip压缩 gzip –c filename > filename.gz    c参数为输出到标准输出
gzip解压 gunzip –c filename.gz > filename
删除空格   tr -d '' a.txt
more hi.txt
/13725354695 在more里面查找字符串
ls -lrt ZWSZ*20080619*
head -2 a.txt >b  把a文档的开头两行提到b文件中  同样适用于tail
 awk -F /| '{s+=$2}END{printf("%.2f/n", s);}'
压缩成a.Z格式并取代原文件   compress a.txt    uncompress a.z 解压 
删掉空格  cat a.txt|tr -d ''>b.txt

shell中调用sqlplus
sqlplus -s user/pwd@datebase<<EOF>/dev/null
spool b.txt
select * from a;
spool off
exit
EOF
cat b.txt|tr -d ''>b.txt
shell中调用dbtool
/dxyyt/kefu/dbtool cxtyd_rw/tyd4321@gdsm2 -f[$sqldir] afljk 1>/dev/null 2>&1 

 

00 08 * * * sh /usr1/run/zw/bin/AirCZAppFile_AIRINS.sh >/dev/null/ 2>&1   crontab

if [ "$a" = q ]   elif
if [ $# -gt 1 ] ;then
echo "the number is to long"
else
echo "that is right"
fi

for 和 case一起使用
set  -A locate sz dg
for a in ${locate[*]}
do
case ${a} in
st)
b=1;;
*)
echo "无效的输入";;
esac
echo "b is ${b} , a is ${a} "
done

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值