Skip to content

Instantly share code, notes, and snippets.

@ryandotsmith
Last active October 11, 2015 22:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryandotsmith/3928687 to your computer and use it in GitHub Desktop.
Save ryandotsmith/3928687 to your computer and use it in GitHub Desktop.
Locking using LOCKFILE(1)
export t=$(date +%s)
lockfile $t #create lock. Try running `lockfile $t` in another shell.
rm -f $t #delete lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment