FreeBSD has lockf as a command line utility (since 1997), though I sometimes wish cron had a builtin locking feature to prevent multiple instances running at the same time. I’ve seen a few things like ts before, but it should be a standard.
I should mention (for google) that lckdo is the moreutils util related to locking.
I also noticed the lockfile command which is part of procmail on my fedora 14 system.
Also today I noticed the lockfile-progs package (via http://twitter.com/jacobian/statuses/37927174136803328 )
“lckdo”! what an incomprehensible/unintuitive name. :( Still, good to know it’s there, although relatively recently — my RHEL5 work desktop doesn’t have it.
The weblog of Justin Mason; incoherent ramblings about Apache SpamAssassin, anti-spam, perl, software development, and the web, from an Irish software developer.
The opinions expressed on this web site are my
personal opinions, and do not in any way represent those of my employer.
Pádraig Brady said,
July 8, 2010 @ 12:59 am
sponge is quite handy, and is equivalent to method 6 here: http://www.pixelbeat.org/docs/unix_file_replacement.html
I use xargs -P instead of parallel, iconv -futf8 -tutf8 instead of isutf8, join/uniq instead of combine
David Malone said,
July 8, 2010 @ 8:36 pm
FreeBSD has lockf as a command line utility (since 1997), though I sometimes wish cron had a builtin locking feature to prevent multiple instances running at the same time. I’ve seen a few things like ts before, but it should be a standard.
Pádraig Brady said,
July 8, 2010 @ 10:47 pm
Oh http://www.freebsd.org/cgi/man.cgi?query=lockf is cool. I’ve needed that functionality in the past and had used a less robust script: http://www.pixelbeat.org/scripts/sematree
Justin said,
July 9, 2010 @ 10:58 am
and needless to say I had my own mutex locking script, too ;)
Pádraig Brady said,
February 17, 2011 @ 11:36 am
I should mention (for google) that lckdo is the moreutils util related to locking. I also noticed the lockfile command which is part of procmail on my fedora 14 system. Also today I noticed the lockfile-progs package (via http://twitter.com/jacobian/statuses/37927174136803328 )
Justin Mason said,
February 17, 2011 @ 11:59 am
“lckdo”! what an incomprehensible/unintuitive name. :( Still, good to know it’s there, although relatively recently — my RHEL5 work desktop doesn’t have it.