摘要:SCP传送文件:scp -P 22022 -i /root/.ssh/aaa.pem file.txt root@111.111.111.111:/var/www/wpvirusdata --------把文件从本地上传到服务器复制文件:cp path_a path_b; //将路径A文件 复制到B...
阅读全文
摘要:shell 文件头格式 #! /bin/sh定义变量 dir_tmp=/tmp/xxx级联创建 mkdir -p /etc/aaa/bbb 阻塞命令 等待用户输入回车 继续 read yum 安装多个软件 自动安装 多个软件中间用空格 yum install -y httpd mod_ssl php-cli php-devel 不记录日志 >/dev/nullcat 输出内容到文件是有顺序执行的cat 1.text 2.text > 3.text 先输出1到3 再输出2到3ssh在登录的机器里执行命令ssh -p 22022 -i /root/.ssh/xxx.pem root@1
阅读全文
摘要://获取本月1号 的命令date +%Y-$m-1shell脚本 把时间命令的值赋给变量 并使用#! /bin/sh#赋值time=$(date +%Y-%m-1) #使用变量(转换成时间戳)time_sjc=$( date -d "$time" +%s)#时间戳转换old_time=$(date -d @$time_sjc "+%Y-%m-%d")echo $old_time
阅读全文
摘要:记录下今天新建虚拟机的过程吧.镜像:CentOS-6.3-x86_64-minimal;虚拟机版本: vm 8.0LET'S----------------------->GO手动新建一台虚拟机,指定镜像,安装........................纳尼,mount:special device /dev/hda does not exist报错了.百度了.这位大神说的好解决方案:重新新建虚拟机,然后在选择镜像的时候 请选择 稍后手动指定 “I will install the operating system later.“,接下来,就开机,然后手动指定镜像...-路顺
阅读全文