![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SHELL
shenling258
这个作者很懒,什么都没留下…
展开
-
常用Shell
定时重启TOMCAT 00 04 * * * /usr/local/reboot_shell/ksms_reboot.sh >> /ksmslog/rebootlog/ksmsrestart_$(date +\%Y\%m).log ksms_reboot.sh : #!/bin/sh source /etc/profile echo $(date +%Y-%m-%d_%H:%M:...原创 2011-01-04 19:32:30 · 60 阅读 · 0 评论 -
Linux环境发布之基础命令学习
1.dirname命令可以取给定路径的目录部分(strip non-directory suffix from file name) # 跳转到脚本所在目录 cd $(dirname "$0") 另一个写法是:cd `dirname $0` 其中反引号··等同于$()。 2.输出到屏幕同时到文件 tree . | tee test.log 3.备份压缩 tar -cz...2012-01-12 15:39:11 · 72 阅读 · 0 评论 -
Linux利用Samba共享文件夹
smb.conf 檔的設定 這個設定檔是 Samba 最重要的設定檔,因為它關係著 Samba Server 是否能正常運作或許多權限 上的設定。說明如下: workgroup 語法:workgroup = <工作群組> 預設:workgroup = MYGROUP netbios name 語法:netbios name = &...原创 2012-02-21 14:25:03 · 80 阅读 · 0 评论 -
服务器间时间同步
由于上海服务器时间不统一可能造成发布警告及其他问题,使用以下方案尝试解决该问题 一.时间服务器的设定 1.选定172.26.166.114作为时间服务器,对NTP配置文件/etc/ntp.conf设定如下 # Permit time synchronization with our time source, but do not # permit the so...2012-03-19 15:15:31 · 97 阅读 · 0 评论 -
差分抽取
#!/bin/bash function GetKey(){ section=$(echo $1 | cut -d '.' -f 1) key=$(echo $1 | cut -d '.' -f 2) sed -n "/\[$section\]/,/\[.*\]/{ /^\[.*\]/d /^[ \...2012-03-23 18:12:09 · 94 阅读 · 0 评论 -
Shell读取配置文件
1.读取文本文件 格式一如下: [server] ip=127.0.0.1 passwd=pass 读取方法如下: function GetKey(){ section=$(echo $1 | cut -d '.' -f 1) key=$(echo $1 | cut -d '.' -f 2) sed -n "/\[$secti...原创 2012-04-11 15:18:34 · 149 阅读 · 0 评论