Re: find command seems to lock files

2019-08-25 Thread Chris Wagner
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

Re: find command seems to lock files

2019-08-21 Thread L A Walsh
On 2019/08/19 09:42, Andrey Repin wrote: > 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. > Except by microsoft, of course. Microsoft's malware

Re: find command seems to lock files

2019-08-19 Thread Greywolf
Greets, Andrey! 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!"' Thank you for

Re: find command seems to lock files

2019-08-19 Thread Eliot Moss
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

Re: find command seems to lock files

2019-08-19 Thread Morten Kjærulff
On Mon, Aug 19, 2019 at 6:50 PM Andrey Repin wrote: > > 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

Re: find command seems to lock files

2019-08-19 Thread Andrey Repin
Greetings, Andrey Repin! > find /xx -type а -iname "zzz" -mtime +10s -execdir 'msg * "Achtung programme > crash boom!"' -type f //me sorry -- With best regards, Andrey Repin Monday, August 19, 2019 19:51:10 Sorry for my terrible english... -- Problem reports:

Re: find command seems to lock files

2019-08-19 Thread Andrey Repin
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,

Re: find command seems to lock files

2019-08-19 Thread Eliot Moss
On 8/19/2019 10:26 AM, Morten Kjærulff wrote: 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

Re: find command seems to lock files

2019-08-19 Thread Morten Kjærulff
On Mon, Aug 19, 2019 at 4:13 PM Corinna Vinschen wrote: > > On Aug 19 10:06, Eliot Moss wrote: > > On 8/19/2019 10:03 AM, Corinna Vinschen wrote: > > > On Aug 19 14:33, Morten Kjærulff wrote: > > > > Hi, > > > > > > > > I have an application which constantly: > > > > creates a file > > > > do

Re: find command seems to lock files

2019-08-19 Thread Corinna Vinschen
On Aug 19 10:06, Eliot Moss wrote: > On 8/19/2019 10:03 AM, Corinna Vinschen wrote: > > On Aug 19 14:33, Morten Kjærulff wrote: > > > Hi, > > > > > > I have an application which constantly: > > > creates a file > > > do some processing > > > deletes the file > > > > > > One way to monitor if the

Re: find command seems to lock files

2019-08-19 Thread Eliot Moss
On 8/19/2019 10:03 AM, Corinna Vinschen wrote: On Aug 19 14:33, Morten Kjærulff wrote: Hi, I have an application which constantly: creates a file do some processing deletes the file One way to monitor if the application has crashed, is to check the age of the file, so I made a script that:

Re: find command seems to lock files

2019-08-19 Thread Corinna Vinschen
On Aug 19 14:33, Morten Kjærulff wrote: > Hi, > > I have an application which constantly: > creates a file > do some processing > deletes the file > > One way to monitor if the application has crashed, is to check the age of > the file, so I made a script that: > > find

find command seems to lock files

2019-08-19 Thread Morten Kjærulff
Hi, I have an application which constantly: creates a file do some processing deletes the file One way to monitor if the application has crashed, is to check the age of the file, so I made a script that: find //$server/d$/dir/subdir*/subsubdir -name 'thefile' -printf '%A+\n' subdir* will be