lock test from sh script

Dag-Erling Smørgrav des at des.no
Fri Oct 17 11:56:56 UTC 2008


Igor Pokrovsky <ip at doom.ctinet.ru> writes:
> I need to check if file is locked or not (with flock) from a shell
> script. I remember there was something but cannot recall what exactly.
> And if possible I do not want to write my own test utility even it
> is several lines in length)

lockf -t0 <file> true

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list