![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
梵墨白
这个作者很懒,什么都没留下…
展开
-
用脚本获取ftp上的文件
FTP_IP=175.6.223.50FTP_USER=sjtbFTP_PWD=E6l!YC4Mdid=$(date -d "0 days ago" +%Y%m%d)/usr/bin/ftp -nv << EOFopen $FTP_IPuser $FTP_USER $FTP_PWDprompt offbinlcd /home/itv-reptile/itv_filecd hunantelecomget coreVideo_$did.txtclosebyeEOF原创 2020-07-07 10:53:43 · 493 阅读 · 0 评论 -
使用scp与expect复制文件脚本实现
#!/bin/env bashread -p "请输入本机文件路径:" filepath1read -p "请输入要传输路径:" filepath2cat /dev/null > ip_up.txt #循环检查主机的网络并且进行文件推送ip_txt=ip.txtwhile read ip passdo ping -c1 $ip &a...原创 2020-01-08 09:43:31 · 147 阅读 · 0 评论 -
使用shell脚本检查Tomcat并重启Tomcat
使用shell脚本检查Tomcat并重启Tomcat#!/bin/bash#导入环境变量export JAVA_HOME=/usr/local/src/java/jdk1.7.0_71# 获取tomcat进程ID(其中[grep -w 'tomcat']代码中的tomcat需要替换为你的tomcat文件夹名)TomcatID=$(ps -ef | grep "org.apache....原创 2020-01-03 14:48:01 · 940 阅读 · 0 评论 -
shell根据文件创建新旧保留近三天的文件
#!/bin/bashdatess=$(date "+%Y-%m-%d %H:%M:%S")echo "-------------------------------------$datess--------------------------------------" >> /home/software/apache-tomcat-8.5.43/logs/cle...原创 2019-12-23 18:08:02 · 497 阅读 · 0 评论 -
清理Linux中大于1G文件文件并清理
#Linux中找寻大于1G的文件并清理##创建一个大于300的文件(以供测试) dd if=/dev/zero of=hello123.txt bs=300M count=1[root@dong test]# find /test -type f -size +300 | xargs rm补充: xargs 该命令应该紧跟在管道操作符之后,它使用标准输入作为主要的数...原创 2019-12-12 11:18:38 · 859 阅读 · 0 评论