Muscovy |
03-19-2010 02:25 PM |
Problems with ftp syncing (issue with untarring)
I'm trying to make a file sync setup. I was getting really bewildered trying to upload files that weren't in the currect directory, so I broke it up like this.
Code:
cd ~/Desktop
find . -type f -mtime -1 | xargs tar -rf find.tar
Which would make a simple tar of everything recently modified.
Code:
#!/bin/bash
#Prelude
STUFF=$*
CURDIR=`pwd`
BASENAME=$(basename $CURDIR)
echo $BASENAME
cd $HOME/Desktop
HOST='****'
USER='****'
PASSWD='****'
ftp -n -v $HOST << EOT
ascii
user $USER $PASSWD
prompt
cd me_ftp
mput find.tar
bye
EOT
This works, except I see no way to untar the files on the server.
|