Peter
Peter

Reputation: 107

Transferring and updating files from local to AWS Ubuntu

So I have been using AWS Ubuntu EC2.

I used scp to transfer files from local machine to remote server. But, when I edited the same files in local machine and transferred them using scp again, the files were not changed in remote server.

scp -i path/to/.pem -r /path/folder_name [email protected]:/new_path/folder_name

How can I fix this problem? Thanks.

Upvotes: 0

Views: 211

Answers (1)

Ashaman Kingpin
Ashaman Kingpin

Reputation: 1577

Try rsync instead?

rsync -e 'ssh -i path/to/.pem' -av /path/folder_name 192.0.2.1:/new_path/folder_name

Upvotes: 1

Related Questions