Mac OS X equivalent of Linux flock(1) command

png picture png · May 10, 2012 · Viewed 16.5k times · Source

Is there a flock command on Mac OS X that manages file lock?

http://linux.die.net/man/1/flock

Answer

sneak picture sneak · Jul 16, 2015

There is a cross-platform flock command here:

https://github.com/discoteq/flock

I have tested it and it works well on OSX as a drop-in replacement for the util-linux flock.