From Omnia
Jump to navigation Jump to search

lockfile - conditional semaphore-file creator

lockfile(1): conditional semaphore-file creator - Linux man page -

Suppose you want to make sure that access to the file "important" is serialised, i.e., no more than one program or shell script should be allowed to access it. For simplicity's sake, let's suppose that it is a shell script. In this case you could solve it like this:

lockfile important.lock
rm -f important.lock

Install part of procmail:

apt install procmail