I thought I had this one in the bag!
OK . . .
I set a variable for the source directory, something like
Code:
NTFS=/mnt/ntfs/Users/name/Documents/School/Spring\ 2010/
and a source directory of
Code:
/home/name/School/Spring\ 2010/
then I'm calling rsync with
Code:
rsync -ar --progress $NTFS $DEST
I added the 'r' for recursive because within the 'Spring 2010' directory I have a directory for each class and then a directory for lectures and other related documents etc., etc.
It didn't react as I expected. In the man page i read something about "--protect-args (-s)" in relation to whitespace so I added that
Code:
rsync -ars --progress $NTFS $DEST
Same exact behavior.
Code:
sending incremental file list
rsync: link_stat "/mnt/ntfs/Users/name/Documents/School/Spring" failed: No such file or directory (2)
rsync: change_dir "/home/name/Desktop/2010" failed: No such file or directory (2)
rsync: link_stat "/home/name/School/Spring" failed: No such file or directory (2)
created directory 2010
sent 18 bytes received 12 bytes 60.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1057) [sender=3.0.6]
I have the script file located on the desktop which is the only explanation i can think of for it to show '/home/name/Desktop/' as a file path in any of the errors. I had thought that using absolute file-paths would make the location of the script itself irrelevant (or did I do that incorrectly)
the directory 2010 referenced at the end of the output was created on the Desktop as well.
Here's the whole script if that helps anyone help me.
Code:
#!/bin/bash
# lecturesync, version 1
# invoke with 'sudo'
# mount point stored in variable
MNT_DIR=/mnt/ntfs
# hard drive device identifier
HD=/dev/sda2
# ntfs source directory
NTFS=/mnt/ntfs/Users/name/Documents/School/Spring\ 2010/
# destination directory
DEST=/home/name/School/Spring\ 2010/
# mount the Win7 ntfs drive
mount -t ntfs $HD $MNT_DIR
# sync the files
rsync -ars --progress $NTFS $DEST