摘要: shell--作业2 1.监控2台服务器硬盘利用率 使用率 输出内容如下 ip:xxxx 磁盘总容量: 40GB 使用磁盘容量:17GB #前提(打通免密) ssh-keygen ls .ssh/ ssh-copy-id root@10.0.0.1 ssh root@10.0.1.142 df -h 阅读全文
posted @ 2024-04-07 22:58 三思博客 阅读(16) 评论(0) 推荐(0) 编辑
摘要: shell--作业1 1 批量解压 使用for循环实现 模板一 #!/bin/bash # 批量解压当前目录下的所有.tar文件 for tar_file in *.tar; do if [ -f "$tar_file" ]; then tar -xvf "$tar_file" && echo "解 阅读全文
posted @ 2024-04-07 22:58 三思博客 阅读(8) 评论(0) 推荐(0) 编辑
摘要: shell常用脚本经典案例-2 1 批量解压 使用for循环实现 模板一 #!/bin/bash # 批量解压当前目录下的所有.tar文件 for tar_file in *.tar; do if [ -f "$tar_file" ]; then tar -xvf "$tar_file" && ec 阅读全文
posted @ 2024-04-07 22:58 三思博客 阅读(2) 评论(0) 推荐(0) 编辑