随笔分类 - shell脚本
摘要:首先需要查到到进程,centos 使用top,iftop #!/bin/bash if [ $# -ne 1 ]; then echo "用法: $0 <进程ID>" exit 1 fi pid=$1 if ! ps -p $pid &> /dev/null; then echo "进程 $pid
阅读全文
摘要:# 删除空目录 /bin/find /data/backup/ -name "*" -type f -size 0c | xargs -n 1 rm -f >/dev/null 2>&1 & /bin/find /data/backup/ -type d -empty | xargs rm -rf
阅读全文