Questions about exclude-file

jw schultz jw at pegasys.ws
Tue Mar 11 02:39:04 EST 2003


On Mon, Mar 10, 2003 at 03:14:28PM -0000, Max Bowsher wrote:
> Max Kipness wrote:
> > Thanks for the response.
> >
> > Concerning the first question of excluding pagefile.sys, yes it would
> > indeed be in use. So you are saying that you cannot exclude a file
> > that is in use?
> 
> Just to demonstrate how weird this situation is:
> 
> max at pomello [~] $ ls /c
> ls: /cygdrive/c/pagefile.sys: No such file or directory
> AUTOEXEC.BAT            IO.SYS         RECYCLER                   boot.ini
> CONFIG.SYS              MSDOS.SYS      System Volume Information
> egathered.xml
> DevProgs                NTDETECT.COM   Video                      ntldr
> Documents and Settings  Program Files  WINDOWS
> 
> Note that pagefile.sys doesn't show up in the dirlist!

That certainly sounds strange but it could make a kind of
sense.  My guess is that ls is attempting to do somthing
that requires opening the file, propbably the equivelant of
stat, prior to filtering hidden files.  I think some
versions of ls may do an lstat(2) on every directory entry
to enable color or file-type markers before even deciding
which files to display or possibly even which fields.
Populating the stat structure would require determining the
file lenght.  I have a vague recollection that on FAT
filesystems the length of the file can only be determined by
walking the block list which may require opening the file.
I have no idea what the case may be for NTFS.  This is
speculative only and may be in complete errror but i have
often been right in guessing the algoritms behind strange
windows behaviors described to me.

It may show up in ls -a.  Try looking at c: in the
filemanager/explorer with "show hidden files", or whatever it
is called, turned on and off.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt


More information about the rsync mailing list