Listing Changed Files Without Two Copies?

Matthias Schniedermeyer ms at
Fri Jul 3 22:26:25 GMT 2009

On 03.07.2009 18:06, Jon Watson wrote:
> Hi All,
> I am aware that rsync can be run to just list the files that have  
> changed between the source and destination. I would like to capitalize  
> on that feature to monitor some development that is going on in order to  
> get a complete list of files that have been changed on a server.
> I realize that I can create an initial rsync of the files to some other  
> location and then sometime later run rsync in list only mode against  
> that initial repository to find out what files have changed.
> I also realize that there are revisioning tools out there but they are  
> complete overkill for this particular issue.
> What I am curious about is if there is a way to achieve this without  
> maintaining two copies of the files. Is there any way to run rsync  
> against a fileset where rsync will produce a checksum or something for  
> those files and can then later determine what files have changed without  
> maintaining a second copy of those files?
> I realize rsync is primarily a backup tool (and a great one!) and this  
> probably falls outside of its purview.

man md5sum

Initially (With filenames that (may) contain spaces):
find * -type f -printf %p\\0 | xargs -0 md5sum > md5

Without filenames that contain spaces it's a little shorter:
find * -type f | xargs md5sum > md5

Then you have a file with an md5sum of all files

And to later check what files have changed:
md5sum -c md5

That's it.

Bis denn

Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.

More information about the rsync mailing list