help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wait until the file is done


From: João Eiras
Subject: Re: wait until the file is done
Date: Sat, 31 Oct 2020 19:41:07 +0100

I'd solve this use case in bash using flock, if you are in a linux like
environment (on windows, use cygwin).
https://linux.die.net/man/1/flock
e.g.

flock -x video.mp4 -c poweroff

The exclusive lock is acquired when no one else has opened the file with
read or write access. That might mean your video editing software closed
the file. Or not. For you to check.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]