delorie.com/archives/browse.cgi | search |
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:reply-to:subject:to:references:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=UXe/my/2uhIKC7NK | |
qAruCdUB6zFL9R6Wta42Gc+HZ1VeapRHxocYHvksh2FPuS5GbmcsXT/FrIeoMpZb | |
WuaisXU7hnLaS4KFM2D8NZVv7MkRApFFx1/PQwNpO0glYC+9UV7Sw76L/Z5D2s4I | |
az9jJA5oPkUzZ+PJHGDOHRp1PHk= | |
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:reply-to:subject:to:references:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=jZQ/wKM9/o5P7DI3945JY9 | |
Xgi9w=; b=rHEqptKRKiu/xC3mtheeuJLQEX03uLiI2zii5xrhdD8/ZOIlKgFokQ | |
tI1/u5ijpzdWdD4qz8s9GQyUDBvYsJutZZQ8sG6eF3MTcsjlzoPVdsDgoT6pT+pj | |
VZ56HSHsYBV0SL/knCR/j9+IB5fKOFIDcILb+PK39SkXtoIdUcDqQ= | |
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.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit |
X-HELO: | mailsrv.cs.umass.edu |
Reply-To: | moss AT cs DOT umass DOT edu |
Subject: | Re: find command seems to lock files |
To: | cygwin AT cygwin DOT com |
References: | <CA+7cx1rwShfSJYJZdvSF-8ERaAQqcYxtQquKKB8xwoBxqhLVog AT mail DOT gmail DOT com> <20190819140308 DOT GN11632 AT calimero DOT vinschen DOT de> <609c28ca-07da-f150-139b-267448ede826 AT cs DOT umass DOT edu> <20190819141321 DOT GO11632 AT calimero DOT vinschen DOT de> <CA+7cx1rZyYwdeGSJFKdzvw_Rjm_4shVY+B-3c0DJmBcqXvjuNA AT mail DOT gmail DOT com> <1621839017 DOT 20190819194256 AT yandex DOT ru> <CA+7cx1ooYni5-rxMZd8DYWKMkrEz56Ui-+xbPUY+-HJKbRdMDg AT mail DOT gmail DOT com> |
From: | Eliot Moss <moss AT cs DOT umass DOT edu> |
Message-ID: | <fc144ea3-afc0-0671-c174-1f95e3c18bdb@cs.umass.edu> |
Date: | Mon, 19 Aug 2019 13:41:53 -0400 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <CA+7cx1ooYni5-rxMZd8DYWKMkrEz56Ui-+xbPUY+-HJKbRdMDg@mail.gmail.com> |
X-IsSubscribed: | yes |
On 8/19/2019 1:21 PM, Morten Kjærulff wrote: > I guess that the reason find opens the file (and thereby trigger > antivirus) is because I print the files timestamp (-printf '%A+\n'), > right? > If I just printed the filename, the file would not be opened, right? I wouldn't say it _opens_ the file, but I read through the Posix man page for stat/lstat/fstatat and it reveals that those calls update the last access time in the inode, so that access the file "more" than just getting some information from the directory. > Will > find /xx -type f -iname "zzz" -mtime +10s -execdir 'msg * "Achtung > programme crash boom!"' > not open the file to get the timestamp? It still needs to look at the timestamps, and presumably needs stat to do that. All you can get from the directory proper is the inode number and the name, I believe. That is not even enough for find to know whether it has to recurse into the thing (is it a directory or not?), so I suspect that find always does a stat call on every entry. Regards - EM -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |