shell脚本之修改root密码
#!/bin/sh if [[ $# -ne 1 ]] then echo "Usage: chpw.sh password" exit 1 fi passwd=$1 echo "${passwd}" | passwd … 阅读全文
#!/bin/sh if [[ $# -ne 1 ]] then echo "Usage: chpw.sh password" exit 1 fi passwd=$1 echo "${passwd}" | passwd … 阅读全文
#!/bin/bash #访问日志存放目录 LOGS_PATH=”/usr/local/nginx/log/” #创建存放分割后的目录,目录以年/月命名 mkdir -p ${logs_path}$(date -d “yesterday” +”%Y”)/$(d … 阅读全文
####把本地/root dao ./bak/cacti-net-bak 下#### #!/bin/bash filename=”`date +%F`.xlsx” ftp -n<<! open IP user 用户 密码 binary hash c … 阅读全文
#!/bin/bash # ###配置函数### info() { if [ $n -eq 1 ]; then echo -e “*******当前时间:*******” date echo -e “*******系统名称:*******” cat /etc/ … 阅读全文