首页 > 数据库 > mysql教程 > 一些自己实践得出的技巧1

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

WBOY
发布: 2016-06-07 15:11:28
原创
1074 人浏览过

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|t

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 #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' 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

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板