Gossamer Forum
Home : General : Internet Technologies :

Comparing Servers

Quote Reply
Comparing Servers
My webhost recently upgraded their shared hosting to a virtual server system. There have been a few issues associated with this upgrade, including files that did not make the transfer.

Is there a simple way or a script that will compare the contents of the old server and make sure the same files are on the new server? And/or the "new" files are at least as large as the "old" files?

Thanks,
--
Rob

SW Montana's Online Community
Modular Model Railroading
Quote Reply
Re: [BeaverheadRiver] Comparing Servers In reply to
On *nix, you can diff two directories.
Code:
brewt@stinky:~/foo$ mkdir 1
brewt@stinky:~/foo$ mkdir 2
brewt@stinky:~/foo$ cd 1
brewt@stinky:~/foo/1$ echo "a" > a
brewt@stinky:~/foo/1$ echo "b" > b
brewt@stinky:~/foo/1$ cd ../2
brewt@stinky:~/foo/2$ echo "a" > a
brewt@stinky:~/foo/2$ echo "c" > b
brewt@stinky:~/foo/2$ cd ..
brewt@stinky:~/foo$ diff -r 1 2
diff -r 1/b 2/b
1c1
< b
---
> c
Or you can always use the 'brief' output:
Code:
brewt@stinky:~/foo$ diff -r --brief 1 2
Files 1/b and 2/b differ

Adrian