WLOCK(1)

πŸ“¦ version 2.1b.20080616, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ‘‘ 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. πŸ—£οΈβœ¨
  • -b begin β€” The lock starts at byte #begin. πŸ“
  • -l length β€” The lock will be length bytes long. πŸ“
  • -a seconds β€” 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