delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/25/16:08:55

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:in-reply-to
:references:message-id; q=dns; s=default; b=JUmOvDgPf/hpJwfI/med
Cx/c06KA+94iFTg5sxTHVDox0WGTC7T1mv7fHP8S1rbz+Sax4Hr+YXwJXFrpvj2k
YTTzST0U4b1ECKttgbjzQhQi2gM1h91yhB55pR/+BBbpcf4xJ/UqhT2rBaysiw9Q
3UrxKWCq0Muf2fiab8FNwwc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:in-reply-to
:references:message-id; s=default; bh=vlRW/XnlSX5jv2rvIR6pNz5H3b
o=; b=AZNN1F+xUErL1CLyCqBOzjREh9ufdSkZOWGdH+L/jNuQtLSZle6qAypxHy
lzba+55BbHdd8NI71+uM1XwJrT3brpuLP4CILACHFw8hrXGohyRKkMXz1CBMRvAa
qy3kFhRcpI6eVwlViUiIFuEs6SCzXncC9Wx+AlNSBgbIsPO2w=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=opening, H*r:esmtpa, HX-Spam-Relays-External:esmtpa, H*RU:esmtpa
X-HELO: www16.qth.com
MIME-Version: 1.0
Date: Sun, 25 Aug 2019 16:08:00 -0400
From: Chris Wagner <wagnerc AT plebeian DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: find command seems to lock files
In-Reply-To: <CA+7cx1rwShfSJYJZdvSF-8ERaAQqcYxtQquKKB8xwoBxqhLVog@mail.gmail.com>
References: <CA+7cx1rwShfSJYJZdvSF-8ERaAQqcYxtQquKKB8xwoBxqhLVog AT mail DOT gmail DOT com>
Message-ID: <26a08c26b5acb89631981fc69425446a@plebeian.com>
X-Sender: wagnerc AT plebeian DOT com
User-Agent: Roundcube Webmail/1.3.8
X-IsSubscribed: yes

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 
opened.

This is why Perl has the ${^WIN32_SLOPPY_STAT} flag variable.

https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#${^WIN32_SLOPPY_STAT}
> ${^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.
> 


-Chris

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019