Advertisement
crabbypup

cron

Oct 5th, 2015
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2. #Run this script via a crontab entry whenever you want your drive usage sampled
  3. FILE=/Library/size_history.csv
  4. MOUNTPOINT="Library"
  5.  
  6. echo "$(/bin/date +%Y/%m/%d),$(df -B G | grep "${MOUNTPOINT}" | awk '{print $3,$2}' | sed -e 's/G//g' -e 's/ /,/')" >> ${FILE}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement