WLOCK(1)
π WLOCK π
okay bestie, gather round, because today we're talking about wlock β the lil sysadmin tool from the System Administration chapter of the manual that does write-locks on files, the POSIX fcntl() kind. She's small, she's mighty, she tests or sets a file with POSIX-fcntl() write-locks, and honestly? iconic. π
β¨ NAME β¨
wlock β Tests or sets a file with POSIX-fcntl() write-locks π
π¦ SYNOPSIS π¦
wlock [ -s [-a seconds ]] [ -t] [ -v] [ -b begin ] [ -l length ] file
or
wlock [ -s ] [ -v] [ -b begin ] [ -l length ] file program [ arguments ]
πΈ DESCRIPTION πΈ
So basically, this program sets or tests advisory locks that conform to the POSIX fcntl() call. That's the whole vibe. β¨
And if you want, you can optionally hand her a program to run, and she'll start it up within the lock context β like, the program gets launched while the lock is held. no cap, that's the main character energy right there. π
π OPTIONS π
These options are accepted. And heads up bestie: if a program is provided as argument, wlock will start it. π«Ά
-sβ Sets the lock. π-tβ Test the lock (this is the default, so if you say nothing, you're testing). π-vβ Verbose output. She will talk to you. π£οΈβ¨-bbegin β The lock starts at byte #begin. π-llength β The lock will be length bytes long. π-aseconds β The lock is active for seconds (default=86400). β°
π₯ RETURN VALUES π₯
0β In test mode this means that the file is locked. In set mode it indicates the succesful creation of the lockfile. β1β The file is not locked. Only available in testmode. π2β Some error has occurred. π
π AUTHOR π
wlock has been written by Ulli Horlacher (framstag@belwue.de>). give her her flowers π
π SEE ALSO π
mwah β this little page is from 19 March 1998, manual section WLOCK(1), and that's the whole vibe check. go lock a file, bestie, you got this. ππ¦β
π¦ where this page comes from
- debian bookworm: sendfile 2.1b.20080616-10
- ubuntu jammy: sendfile 2.1b.20080616-9
- ubuntu noble: sendfile 2.1b.20080616-10build2
- Copyright (c) 1998 Martin Schulze <joey@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms