Download diskwatch.sh from AjayRangoji/AR: direct link, hf CLI and curl.
- Browser
- Download file 436 Bytes
-
https://huggingface.co/AjayRangoji/AR/resolve/main/diskwatch.sh
- Command line
-
hf download hf://AjayRangoji/AR/diskwatch.sh
-
curl -L -o diskwatch.sh https://huggingface.co/AjayRangoji/AR/resolve/main/diskwatch.sh
436 Bytes
| # Logs free space on /fsx every 5 minutes; readings below LOW_GB are marked LOW. | |
| # Start: nohup ./diskwatch.sh >> logs/disk.log 2>&1 & Stop: pkill -f diskwatch.sh | |
| cd /fsx/ajay-stu/AR | |
| LOW_GB=300 | |
| while true; do | |
| free=$(df -BG --output=avail /fsx | tail -1 | tr -dc '0-9') # free space in GB | |
| tag=""; [ "$free" -lt $LOW_GB ] && tag=" <-- LOW" | |
| echo "$(date -u '+%m-%d %H:%M') UTC free=${free}G$tag" | |
| sleep 300 | |
| done | |