AptLynx

Command-line tool

flock

brew/flock

Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev

Lock file during command

At a glance

Type
Command-line tool
Install on
Windows, macOS, Linux
Last checked
25 Oct 2026, 21:09 UTC

Install it

Windows

winget install --id FlockFZ.Flock -e

macOS

brew install flock

Linux

brew install flock

Run a command with a file lock as soon as the lock is available

flock path/to/lock.lock command

Run a command with a file lock, or exit if the lock is currently being held (with exit code 1)

flock -n path/to/lock.lock command

Run a command with a file lock, or exit with a specific error code if the lock is currently being held

flock -n -E 123 path/to/lock.lock command

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents