zoukankan      html  css  js  c++  java
  • 一个检查本机和远程机器的根目录所在磁盘的剩余空间的bash小脚本

    上星期写的,参考的网页也不记得了。

    #!/bin/bash
    
    # List remote machine df output
    echo "On drivers:"
    clients=("10.245.109.216" "10.245.109.217" "10.245.109.218" "10.245.109.219" "10.245.109.220" "10.245.109.221" "10.245.109.222" "10.245.109.223")
    for i in ${!clients[@]};
    do
        ip=${clients[$i]}
        ssh $ip hostname
        ssh $ip "df -h | grep root "
    done
    
    # List local machine df output
    echo "On controller:"
    df -h | grep root
    


    供参考和进一步的改造。

  • 相关阅读:
    1.13 Flask
    1.12 Flask 复习
    1.11 flask
    1.10 flask
    1.9 flask
    1.8 flask 路由
    sql server存储过程
    Ajax学习笔记
    随机密码字典生成器
    jRazor
  • 原文地址:https://www.cnblogs.com/awpatp/p/13920021.html
Copyright © 2011-2022 走看看