find command seems to lock files

Chris Wagner
Mon Aug 26 01:57:00 GMT 2019

On 2019-08-19 8:33 am, Morten Kjærulff wrote:
> find //$server/d$/dir/subdir*/subsubdir -name 'thefile' -printf '%A+\n'
> Problem is that it seems this command locks thefile, as the application
> sometimes can't delete it.

Unfortunately, yes.  On Windows, a "full stat" requires that the file be 

This is why Perl has the ${^WIN32_SLOPPY_STAT} flag variable.${^WIN32_SLOPPY_STAT}
> If this variable is set to a true value, then stat() on Windows will 
> not try to open the file. This means that the link count cannot be 
> determined and file attributes may be out of date if additional 
> hardlinks to the file exist. On the other hand, not opening the file is 
> considerably faster, especially for files on network drives.


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list