Usage: flock [options] | [...] flock [options] | -c flock [options] Manage file locks from shell scripts. Options: -s, --shared get a shared lock -x, --exclusive get an exclusive lock (default) -u, --unlock remove a lock -n, --nb, --nonblocking fail rather than wait -w, --timeout wait for a limited amount of time -E, --conflict-exit-code exit code after conflict or timeout -o, --close close file descriptor before running command -c, --command run a single command string through the shell -F, --no-fork execute command without forking --wait same as --timeout --fcntl use fcntl(F_OFD_SETLK) rather than flock() --start starting offset for lock (implies --fcntl) --length number of bytes to lock (implies --fcntl) --verbose increase verbosity -h, --help display this help -V, --version display version For more details see flock(1).