X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=5.0 required=5.0 tests=BAYES_40,BOTNET,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Message-id: <19788.29038.781954.877755@consult.pretender> Date: Fri, 04 Feb 2011 16:36:46 -0500 MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit From: "Jeffrey J. Kosowsky" To: cygwin AT cygwin DOT com Subject: 'diff -ruw' messes up on shadow mounts for directories but works for files X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I use vshadow under WinXP to create shadow copies of my Windows partitions and then I use dosdev to associate the shadow copies with drive letters (since at least in the past it was not possible to access WinXP shadow copies directly from cygwin). I then mount the drive using the standard cygwin mount command. Now commands like 'ls' and 'find' all show that the shadow copy is properly mounted. When I run 'diff' on an *individual* file to check for differences between the shadow copy and the original it works perfectly. HOWEVER, when I run 'diff -ruw', on a directory to check recursively for differences between the original and the shadow copy, it just returns immediately (no matter how big the directory tree) with no output and a successful exit code (0). This happens even though many files have changed in the tree both in the top level directory and below. HOWEVER if I add a *new* file to the *top* level directory being compared, then 'diff -ruw' works fine. It continues to work fine even if I remove the new file. It also then works fine on any other directory tree containing that tree. But not on other directory trees that don't intersect with the one just touched. Also, adding a new file below the top level directory doesn't help. Nor does modifying an *existing* file in the top level directory. ALSO, if I make a copy first of the original directory and compare it the shadow copy version then it always works. SO, it seems like diff is not properly getting the directory of the shadow mount and perhaps thinks it is the original non-shadow version and therefore if the inode of the top level directory hasn't changed (say by adding a new a file), it takes a shortcut and doesn't actually try to recurse down the directory listing to see if indeed the files have changed but rather just comes back immediately and says hey since the top level directory is the 'same' the whole tree must be the same, so no diffs. Note that 'rsync -a' does not experience this problem. Any thoughts on what might be going on here? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple