comparing directories and files
This should be an easy question for most of you to answer. I am ftping files from one server to another and when I SSH to both systems and do a "tree" on alot of the directories i seem to be having a difference of a few files, sometimes more. Is there an easy (or easier) way to actually SEE what files are on the original server and arnt on the new one. without having to dig through thousands of directories andlooking over each individual file?
Thanks for the help |
Why not just use rsync to synchronize the two directories ?
http://www.cyberciti.biz/tips/linux-...rectories.html |
I'm not familiar with "tree", but generating a listing of files and running them through diff comes to mind.
Run: Code:
$ find . | sort > listing1 Then run diff (or sdiff) against the two listings: Code:
$ diff listing1 listing2 |
I think the rsync way is a good one, if you will be doing this constantly. I read it as though this was a one time thing.
|
Well yes in a sense this is a one time thing but it will take me all month to do it manually if I have to compare ll the directories on my systems. Now with the rsync thing I am assuming i want to do this method
Task: Mirror a directory between my “old” and “new” web server/ftp? Also in regards to the rsync, I should install rsync onto the "new" server correct? thanks again |
All times are GMT -5. The time now is 12:30 AM. |