Quote:
Originally Posted by blowtorch
You can use rsync for this. Rsync works over ssh as well. If you have to write your own script, you can do something like this:
1. ssh to remote and get list of files (use ssh and ls on remote path)
2. compare remote list with local list and create list of files to remove (files that are not present locally) (use comm command)
3. ssh to remote and remove files that are in the list (use ssh and rm on remote path)
4. scp files from local to remote (scp as in current script)
|
thnks for the reply
but what i wanted was ,that i dont watn to login onto the remote server manually,i want my script to do that and it must automatically detect find out the list of files and delete the old one's on the remote server to make the list look identical on both the source and the target
thnk you,its urgent so pls any kind of idea is appreciated