[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wait until the file is done
From: |
Mike Jonkmans |
Subject: |
Re: wait until the file is done |
Date: |
Fri, 30 Oct 2020 19:30:02 +0100 |
On Fri, Oct 30, 2020 at 11:10:18AM -0700, Russell Lewis wrote:
> Question, then an idea:
>
> Q:
> Any reason to use wc -c over ls -al? Is one worse or better, or are they
> more or less the same? Maybe ls output requires more parsing?
Parsing ls output is not such a good idea.
I have seen scripts break when ls' output changed.
E.g. when the '+' character came into play.
> Idea:
> Instead of checking file size every thirty seconds and trying to be
> precise, you could just wait 10m at a time, and terminate when you see
> *any* window with no change. Worst case, you end up waiting 19.99 minutes,
> but that's probably acceptable for this application.
Larger intervals leads to more energy use.
But so does frequent polling.
Regards, Mike Jonkmans
--
Mike Jonkmans <bashbug@jonkmans.nl>
- wait until the file is done, MN, 2020/10/30
- Re: wait until the file is done, Greg Wooledge, 2020/10/30
- Re: wait until the file is done, MN, 2020/10/30
- Re: wait until the file is done, Greg Wooledge, 2020/10/30
- Re: wait until the file is done, Mike Jonkmans, 2020/10/30
- Re: wait until the file is done, Greg Wooledge, 2020/10/30
- Re: wait until the file is done, Dennis Williamson, 2020/10/30
- Re: wait until the file is done, Mike Jonkmans, 2020/10/30
- Re: wait until the file is done, Russell Lewis, 2020/10/30
- Re: wait until the file is done, Greg Wooledge, 2020/10/30
- Re: wait until the file is done,
Mike Jonkmans <=
- Re: wait until the file is done, Seth David Schoen, 2020/10/30
Re: wait until the file is done, MN, 2020/10/30
Re: wait until the file is done, MN, 2020/10/31