July 2017
Beginner
208 pages
3h 7m
English
And now, for another bonus the next section shows the script I used to backup my current book's chapter every 60 seconds:
#!/bin/sh # # Auto backs up the file given if it has changed # Assumes the cbS command exists # Checks that ../back exists # Copies to specific USB directory # Checks if filename.bak exists on startup, copy if it doesn't echo "autobackup by Lewis 5/9/2017 A" if [ $# -ne 3 ] ; then echo "Usage: autobackup filename USB-backup-dir delay" exit 255 fi # Create back directory if it does not exist if [ ! -d back ] ; then mkdir back fi FN=$1 # filename to monitor USBdir=$2 # USB directory to copy to DELAY=$3 # how often to check if [ ! -f $FN ] ; then # if no filename abort echo ...
Read now
Unlock full access