2016年10月26日
摘要: // 用法:Runtime.getRuntime().exec("命令"); String shpath="/test/test.sh"; //程序路径 Process process =null; String command1 = “chmod 777 ” + shpath; try { Runtime.getRuntime()... 阅读全文
posted @ 2016-10-26 17:40 让编程成为一种习惯 阅读(1727) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash # Cloudinsight Agent install script. set -e logfile="ci-agent-install.log" gist_request=/tmp/agent-gist-request.tmp gist_response=/tmp/agent-gist-response.tmp if [ $(command -v curl) ]; ... 阅读全文
posted @ 2016-10-26 17:27 让编程成为一种习惯 阅读(699) 评论(0) 推荐(0) 编辑
摘要: 在c盘下面新建文件 ping.vbs在 ping.vbs中输入代码如下: 在命令行输入命令行进入到C盘,并输入以下命令, 阅读全文
posted @ 2016-10-26 17:15 让编程成为一种习惯 阅读(7891) 评论(0) 推荐(0) 编辑
摘要: 放后台运行命令:setsid 实时输出命令:unbuffer 加时间戳:awk '{ print $0"\t" strftime("%D_%H:%M:%S",systime()) } ' 命令如下:setsid unbuffer ping 172.17.1.1 -i 2 | awk '{ print 阅读全文
posted @ 2016-10-26 17:13 让编程成为一种习惯 阅读(6712) 评论(0) 推荐(0) 编辑