I have some n number of files in a directory on my unix system. Is there a way to write a shellscript that will transfer all those files via scp to a specified remote system
rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when the destination file is being updated.
The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network connection, using an efficient checksum-search algorithm described in the technical report that accompanies this package.
#!/usr/bin/expect -f
spawn rsync -a -e ssh username@192.168.1.123:/cool/cool1/* /tmp/cool/
expect "password:"
send "cool\r"
expect "*\r"
expect "\r"