From: Andrey Repin <anrdaemon@yandex.ru>
To: "Morten Kjærulff" <mortenkjarulff@gmail.com>, cygwin@cygwin.com
Subject: Re: find command seems to lock files
Date: Mon, 19 Aug 2019 17:05:00 -0000 [thread overview]
Message-ID: <1621839017.20190819194256@yandex.ru> (raw)
In-Reply-To: <CA+7cx1rZyYwdeGSJFKdzvw_Rjm_4shVY+B-3c0DJmBcqXvjuNA@mail.gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 2021 bytes --]
Greetings, Morten Kjærulff!
>>
>> > If the application in question creates and deletes the parent
>> > directory, as well as the leaf file, then things would be left
>> > around unexpectedly.
>>
>> The question was just if the file is locked.
>>
>> > So would use of find trigger a virus scanner, which in turn might
>> > hold on to the file and prevent its deletion?
>>
>> That's how some realtime scanners work. They have hooks in the file API
>> and if some other process opens a file these scanners open the file as
>> well, typically without FILE_SHARE_DELETE, which Cygwin uses by default.
>>
>>
>> Corinna
>>
>> --
>> Corinna Vinschen
>> Cygwin Maintainer
> I forgot to say that I run the find command on my own PC, and the
> application runs on a server, which I have 'net use' its disk.
> Would it be the virus scanner on my PC or on the server?
> Any idea of a different way to get the age of the file? (I am sure I
> cannot change the virus scanner).
To begin with, the results of your `find` calls will be at least 5 seconds
stale over CIFS share with default settings.
Said that, you could safely write something like
find /xx -type а -iname "zzz" -mtime +10s -execdir 'msg * "Achtung programme crash boom!"'
In regard to antivirus,
1. first make sure your local AV does not scan network directories by default.
This is a gigantic usability issue for multiple reasons and normally is never done.
2. if possible, check what exactly happens when your program loÑks up.
Yes, as said above, find will lock /directories/ it is scanning.
This is how Windows filesystem API works.
But it should not lock files by itself.
--
With best regards,
Andrey Repin
Monday, August 19, 2019 19:36:25
Sorry for my terrible english...\x03BKCB\x1cØ\x19[H\x1c\^[Ü\x1cÎ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0eËØÞYÝÚ[ÛÛKÜ\x1cØ\x19[\Ë\x1d^[[\x03BTN\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0eËØÞYÝÚ[ÛÛKÙ\KÃB^[ØÝ[Y[\x18]\x1a[Û\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0eËØÞYÝÚ[ÛÛKÙ^[ØÜË\x1d^[[\x03B[ÝXØÜXH\x1a[Î\b\b\b\b\b\x1a\x1d\x1d\x1c\x0eËØÞYÝÚ[ÛÛKÛ[\vÈÝ[ÝXØÜXK\Ú[\^[\x19CBB
next prev parent reply other threads:[~2019-08-19 16:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 12:49 Morten Kjærulff
2019-08-19 14:06 ` Corinna Vinschen
2019-08-19 14:13 ` Eliot Moss
2019-08-19 14:26 ` Corinna Vinschen
2019-08-19 14:41 ` Morten Kjærulff
2019-08-19 15:03 ` Eliot Moss
2019-08-19 17:05 ` Andrey Repin [this message]
2019-08-19 17:21 ` Andrey Repin
2019-08-19 17:41 ` Morten Kjærulff
2019-08-19 18:52 ` Eliot Moss
2019-08-19 19:43 ` Greywolf
2019-08-21 19:53 ` L A Walsh
2019-08-26 1:57 ` Chris Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1621839017.20190819194256@yandex.ru \
--to=anrdaemon@yandex.ru \
--cc=cygwin@cygwin.com \
--cc=mortenkjarulff@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).