linux (red hat) compare directories and copy over files that are different
I basically want rsync, but don't have the luxury of being able to install it.
But I need a way to deploy files from one server to another. I edit one or more files on one server and then need to copy all modified files to another server by comparing files that aren't 开发者_运维知识库the same (and being able to exclude .htaccess files)
Does anyone know of an easy way to do this?
Thanks, Scott
(I will assume that you have shell access to both servers)
You do not need to install rsync
system-wide. You can install it in your home-directory. First get a copy of the rsync
binary for your distribution:
You can extract it from the
rsync
RPM package usingrpm2cpio
andcpio
You can copy it from another RedHat installation
You can copy it from another Linux installation for the same platform - there is a string possibility that it will work fine
Then you need to permanently modify the PATH
environment variable so that the rsync
command is found by your shell. If you do that for your user accounts in both servers, you can use rsync
normally without the need for root privileges.
If you have access to install rsync on one server, that's all you need minimum.
If not, the question is what tools do you currently have available? scp? sftp? ftp? ssh? telnet? find?
精彩评论