getlock 0.3

A simple and easy to use command-line file locking program for Linux and UNIX OSes

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in getlock 0.3:

  • This version adds the -v/-version command line flag and -n/-nohup command line flags.
Read full changelog
send us
an update
LICENSE TYPE:
GPL (GNU General Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Colum Paget
HOMEPAGE:
sites.google.com
CATEGORY:
ROOT \ Utilities
3 getlock 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
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

#lock program #file locking #locking system #lock #locking #lockfile #command-line

Add your review!

SUBMIT