Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1080148
  • 博文数量: 143
  • 博客积分: 969
  • 博客等级: 准尉
  • 技术积分: 1765
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-30 12:09
文章分类

全部博文(143)

文章存档

2023年(4)

2021年(2)

2020年(4)

2019年(4)

2018年(33)

2017年(6)

2016年(13)

2014年(7)

2013年(23)

2012年(33)

2011年(14)

我的朋友

发布时间:2019-06-18 21:10:02

path=$1arrs=(20190618)for ip in ${arrs[@]};do tmp=$path$ip  filelist=`ls $tmp` for file in  $filelist do  echo   $path$file   if test -f $file    then        echo $file  is file    else.........【阅读全文】

阅读(736) | 评论(0) | 转发(0)

发布时间:2018-12-02 18:03:49

先了解下rsync的同步参数选项,先通过本地同步的方式来验证rsync的同步参数。-v      :详细模式输出,传输时的进度等信息-z      :传输时进行压缩以提高效率—compress-level=num可按级别压缩-r      :对子目录以递归模式,即目录下的所有目录都同样传输。-t&nbs.........【阅读全文】

阅读(7550) | 评论(0) | 转发(0)

发布时间:2017-10-12 16:10:26

for i in $(ls *.tar.gz);do   echo  $i;  fn=$i;  tt=`echo ${fn/.tar.gz/}`;  tar -xzvf $i -O >  $tt  ;done......【阅读全文】

阅读(1283) | 评论(0) | 转发(0)

发布时间:2017-02-22 14:44:23

最近在发布版本时,需要多个台主机之间来回scp,而且每次需要数据密码,操作比较麻烦。因此,写个脚本一键发布。前提需要ssh免密钥登录,具体操作详解ssh免密钥登录。点击(此处)折叠或打开#!/bin/bashdest_ip_arr=(10.99.11.23)dest_lib_dir="/ins.........【阅读全文】

阅读(1566) | 评论(0) | 转发(0)

发布时间:2017-02-17 09:38:30

#!/bin/bashlogs_path="/tomcat/tomcat-token/logs"find $logs_path -mtime +7 -name "localhost_access_log.*.txt" -exec rm -rf {} \;find $logs_path -mtime +7 -name "catalina.*.log" -exec rm -rf {} \;find $logs_path -mtime +7 -name "manager.*.log" -exec rm -rf {} \;find $logs_path -mtime +7 -name ".........【阅读全文】

阅读(6658) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册