I have moved a web site from one server to another and I copied the files using SCP. I now wish to check that all the files have been copied OK. How do I compare the sites?
Count files for a folder? Get the total files size for folder tree? Or is there a better way to compare the sites?
If you were using scp, you could probably have used rsync.
rsync won’t transfer files that are already up to date, so you can use it to verify a copy is current by simply running rsync again.
If you were doing something like this on the old host:
Then you could do something like
The ‘-a’ is short for ‘archive’ which does a recursive copy and preserves permissions, ownerships etc. Check the man page for more info, as it can do a lot of clever things.