getlock 0.3

A simple and easy to use command-line file locking program for Linux and UNIX OSes
Getlock is an open source, simple and free command-line file locking application, which can lock one or more lockfiles, and then run a shell command.

getlock features several advanced options, allowing users to just lock files, to run a command when it can't lock the file, to kill off the current holder of the lockfile, etc. Below we've listed some examples of use, courtesy of the project's home page:

Lock Multiple files then run program, fail instantly if can't lock:
 getlock /tmp/file1.lck /tmp/file2.lck "echo hello"

Try for 1 minute to lock a file, run program '/tmp/lockfail.sh' if can't get lock:
 getlock -w -t 60 /tmp/file1.lck -F "/tmp/lockfail.sh" "echo got lock"

Kill owner of lockfile after waiting 30 secs:
 getlock -w -g 30 -k /var/lock/file1.lck "echo got lock"

Just lock files, don't run a program:
 getlock -w -N /var/lock/file1.lck /tmp/file2.lck

Run program even if can't get lock:
 getlock -w -t 30 -X /tmp/file1.lck "/usr/sbin/program-that-must-run.sh"

Lock 3 files, do not write PID to the last of these:
 getlock -w /tmp/lockfile1.lck /var/lock/lockfile2.lck -s /home/colum/MyWork.txt "vi /home/colum/MyWork.txt"

last updated on:
September 26th, 2013, 13:44 GMT
price:
FREE!
developed by:
Colum Paget
license type:
GPL (GNU General Public License) 
category:
ROOT \ Utilities

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

3 Screenshots
getlock - Usage example and help menu of the getlock software, as viewed from the Linux Terminalgetlock - Usage example and help menu of the getlock software, as viewed from the Linux Terminalgetlock - Usage example and help menu of the getlock software, as viewed from the Linux Terminal
What's New in This Release:
  • This version adds the -v/-version command line flag and -n/-nohup command line flags.
read full changelog

Add your review!

SUBMIT