Incremental backup script

#!/bin/bash # ———————————————————————- # mikes handy rotating-filesystem-snapshot utility # ———————————————————————- # this needs to be a lot more general, but the basic idea is it makes # rotating backup-snapshots of /home whenever called # ———————————————————————- unset PATH # suggestion from H. Milz: avoid accidental use of $PATH # ————- system commands used by this script […]

Read More

Disk Usage

#!/bin/sh # set -x # Shell script to monitor or watch the disk space # It will send an email to $ADMIN, if the (free available) percentage of space is >= 90%. # ————————————————————————- # Set admin email so that you can get email. ADMIN="root" # set alert level 90% is default ALERT=90 # Exclude […]

Read More

Checking Server Utilization

Shell Scrip for Checking Server Utilization #!/bin/bash date; echo "uptime:" uptime echo "Currently connected:" w echo "——————–" echo "Last logins:" last -a |head -3 echo "——————–" echo "Disk and memory usage:" df -h | xargs | awk '{print "Free/total disk: " $11 " / " $9}' free -m | xargs | awk '{print "Free/total memory: […]

Read More