一些自己实践得出的技巧1

locate xboing > test
tar -cvf xboing.tar -T test
gzip xboing.tar
cp xboing.tar.gz /mnt/usb
the above command can copy a software which have been installed on someone system to your own system^-^
#!/bin/sh
for fname in *;do
tmp=`echo $fname|tr [a-z] [A-Z]`  #note ,tr can't act like this'tr fname [a-z] [A-Z]'
# it must run as this'tr <fname [a-z] [A-Z]',but this will upcased the content of fname
#so,if you want rename a file list,you must redirect tr's stdin to some command's stdout
mv $fname $tmp
done
the above code cost me lots of time!^-^
it can rename file name in your current dir from lowercase to upper case
this is very useful while you untar a tarball which is tared in a dos/windows system

date +%m-%d-%Y
the above cmd can output current time in MM-DD-YYYY format

tr -s '/n' '/n' <test.txt
the above cmd will del all empty line

ls {*.wav,*.mp3}
the above cmd list all mp3 or wav files in current dir
ls {*.wav,*.mp3,*.log}
the above cmd list all mp3 or wav or log files in current dir

if  [ $(date +%H) -ge 22 ]; then
echo whp; else
echo dll; fi
you can do diffrent work in diffrent time

grep 'd/+' test.txt
grep 'd/{1,/}' test.txt
the above cmd match lines which contain one or more 'd'

if you want to use xpdf,you must install /slackware/l/lesstif

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值