Dbvisit Community Dbvisit home       

Go Back   Dbvisit Community > General Technical > Platform

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 11-20-2011, 11:09 AM
Arjen Visser Arjen Visser is offline
Dbvisit Team
Join Date: Jan 2008
Location: Auckland, New Zealand
Posts: 383
Default Compare two directory trees for differences in their files

This compares the files in 2 directories. Both these directories are under svn control.

rsync --dry-run --exclude=".svn" -Hav dbvisit-trunk/dbvserver/ project542/dbvserver/

Note: the slash at the end of the paths is of importance, as it means "the content of" to rsync.

Rsync lists all directories it enters, but ONLY files which would be rsync'ed are listed, i.e. those files that are different between the trees.

EXTRA: Stick this one into /etc/bash.bashrc.local (or ~/.bashrc or what ever you use) to add an alias to your shell environment:

alias treediff='rsync --dry-run --exclude=".svn" -Hav '

then use it like so:

treediff dbvisit-trunk/dbvserver/ project542/dbvserver/

Thanks to Holger Jahn for this neat trick.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT +12. The time now is 09:15 PM.