[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: diff caches stuff in memory?



I too doubt this is directly related to diff (but I could be wrong).  Is
the clean_dir by chance on a network share?  I did have a similar problem
with a Samba share.  If someone logged onto the Samba machine and modified
a file, then a Windows machine on the network would not detect that the
file had been changed because the Windows machine was caching the file. 
This was fixed by putting the option "oplocks = False" in the smb.conf
file.  I'm not sure if NFS exported directories might have similar
problems.  This probably doesn't help, but I thought it might be worth a
shot.

Gerry

On Wed, 17 Nov 1999, David Wright wrote:

> Quoting Colin Marquardt (colin.marquardt@gmx.de):
> 
> > apparently diff caches stuff in memory.
> 
> That seems unlikely. I thought linux did that itself.
> 
> > I noticed that when I wanted to make a patch with
> > 
> >    diff -urN clean_dir patched_dir > my_patch
> > 
> > The patch came out fine, but then I realized that clean_dir wasn´t
> > really clean, so I made a new clean version *with the same* directory
> > name.
> > 
> > The second time I ran diff it went really fast. Too fast: it didn´t
> > examine the files in clean_dir at all, it just used the data from
> > the previous run which it had cached, so my patch was the same as
> > before (wrong).
> 
> I'm not sure what you mean by "made a new clean version".
> (I'm sure you know that -N means any empty files that were
> cleaned away will have no effect on diff's output.)
> 
> > How can I get diff to forget what it saw? The manpage doesn´t tell
> > me. (I didn´t think about `touch'ing the directory then, but I
> > untarred clean_dir from a tarball, so it should have gotten a newer
> > time stamp).
> 
> I didn't know diff bothered about timestamps, and I doubt kernel
> caching uses them either. (Of course, programs like tar and zip do.)
> 
> So, were I examining evidence, I'd be interested to know how you
> cleaned clean_dir, and I'd want to see a log showing diff getting
> the wrong answers (i.e. the diff output and two cats of affected
> files).
> 
> Cheers,
> 
> -- 
> Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
> Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
> Disclaimer:   These addresses are only for reaching me, and do not signify
> official stationery. Views expressed here are either my own or plagiarised.
> 
> 
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
> 


Reply to: