Sunday 13, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Sunday, 17 September 2017

lockfile Linux Command

lockfile

lockfile [options] filenames
Create semaphore file(s), used to limit access to a file. When lockfile fails to create some of the specified files, it pauses for eight seconds and retries the last one on which it failed. The command processes flags as they are encountered (i.e., a flag that is specified after a file will not affect that file). This command is most often used by scripts and applications as a way to avoid multiple users changing the same file at once.

Options

-sleeptime
Number of seconds lockfile waits before retrying after a failed creation attempt. Default is 8.

-!
Invert return value. Useful in shell scripts.

-l lockout_time
Time (in seconds) after a lockfile was last modified at which it will be removed by force. See also -s.

-ml, -mu
If the permissions on the system mail spool directory allow it or if lockfile is suitably setgid, lockfile can lock and unlock your system mailbox with the options -ml and -mu, respectively.

-r retries
Stop trying to create files after this many retries. The default is -1 (never stop trying). When giving up, remove all created files.

-s suspend_time
After a lockfile has been removed by force (see -l), a suspension of 16 seconds takes place by default. (This is intended to prevent the inadvertent immediate removal of any lockfile newly created by another program.) Use -s to change the default suspend time.

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • autoscan Linux Command autoscan autoscan [options] [directory] GNU autoconf tool. Create or maintain a preliminary configure.ac file named configure.scan based on source files in specified directory, or current directory if none given. If a conf… Read More
  • autoupdate Linux Command autoupdate autoupdate [options] [file] GNU autoconf tool. Update the configure template file file, or configure.ac if no file is specified. This command is seldom invoked manually. It is usually called automatically from o… Read More
  • autoconf Linux Command autoconf autoconf [options] [template_file] Generate a configuration script from m4 macros defined in template_file, if given, or in a configure.ac or configure.in file in the current working directory. The generated scrip… Read More
  • autoreconf Linux Command autoreconf autoreconf [options] GNU autoconf tool. Update configure scripts by running autoconf, autoheader, aclocal, automake, and libtoolize in specified directories and subdirectories. This command is seldom invoked ma… Read More
  • sdiff Linux Command sdiff sdiff -o outfile [options] from to Find differences between the two files from and to and merge interactively, writing the results to outfile. Options -- Treat remaining options as filenames, even if they begin wit… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: lockfile Linux Command Rating: 5 Reviewed By: eHowToNow