Skip to content

Instantly share code, notes, and snippets.

Created Jan 12, 2020
What would you like to do?
Shell script to be used in emergency when your Final Cut Pro has taken up over 50% of drive space, and you can't operate the Mac in any normal fashion
EXTERNAL_BACKUP_DIR="/Volumes/data disk"
mv "$LIBRARY_NAME" $EXTERNAL_BACKUP_DIR/ & #send the move to background
# monitor the destination path
raw footage library % lastSize=`du -s "$EXTERNAL_BACKUP_DIR/$LIBRARY_NAME" | tr '\t' ' ' | cut -d' ' -f1`;
while true
size=`du -s "$EXTERNAL_BACKUP_DIR/$LIBRARY_NAME" | tr '\t' ' ' | cut -d' ' -f1`
copyBytes=`expr $size - $lastSize`
TIMESTAMP=$(date "+%y-%m-%d %H:%M:%S")
echo "$TIMESTAMP move rate $(expr $copyBytes / 1024) kb/s"
sleep 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment