Lock files are used to prevent simultaneous access to a specific file, device, or to prevent an application from being started twice. Lock files are found in Unix-like systems under the directory
/var/lock (or more recently,
A lock file may be empty, but it usually contains the process ID of the program holding the lock.
Not to be confused with a File lock, although a lock file often has a file lock.