Skip to content

Instantly share code, notes, and snippets.

@brimur
brimur / checkDisk.sh
Last active Nov 29, 2019
Cron script to control
View checkDisk.sh
#!/bin/bash
# Customise here...
partition="/dev/mapper/vg-lv_root"
threshold="95"
#End customise
percent=$(df -h | grep $partition | awk '{ print $5 }' | sed 's/%//g')
echo Disk is "$percent" % full
if ((percent > threshold))
You can’t perform that action at this time.