lckdo
runs commands with file locking
TLDR
Run with lock
SYNOPSIS
lckdo [options] lockfile command
DESCRIPTION
lckdo executes a command while holding an exclusive file lock, ensuring that only one instance of the command runs at a time. This is particularly valuable for cron jobs and scheduled tasks where overlapping executions could cause data corruption or resource contention.
The tool acquires an exclusive lock on the specified lock file before running the command, and releases it when the command completes. By default it waits for the lock to become available, but you can use -n to fail immediately if the lock is held, or -w to set a timeout. Note that lckdo is deprecated in favor of `flock`, which provides the same functionality and is available as part of the standard util-linux package.
PARAMETERS
LOCKFILE
Lock file path.COMMAND
Command to execute.-n
Non-blocking (fail if locked).-W
Wait forever for lock.-w SECONDS
Wait timeout.--help
Display help information.
CAVEATS
Deprecated in favor of flock. Part of moreutils. Lock file must be writable.
HISTORY
lckdo was part of moreutils for running commands under file locks, now replaced by flock.
