Co robi LOCKFILE użycie. Konsola specified files, it pauses for eight seconds and retries the last.

Czy przydatne?

Polecenie lockfile

Wykonanie, użycie: 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

Opcje wykonania lockfile w konsoli

-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.

Przykłady lockfile działanie w Słownik polecenie L

Przykład LOCKFILE użycie :
Jak użyć the print queue or queues. With options that take a list argument, omitting the list produces all information for that option. list can be separated by commas or, if enclosed in double quotes, by co znaczy.
Przykład LOCKFILE użycie :
Jak użyć printed. If no files are given, accept standard input. We document the CUPS printing system here; the older LPRng and BSD systems will vary slightly. CUPS lpr, for example, does not accept the krzyżówka.
Przykład LOCKFILE użycie :
Jak użyć links) for files , allowing them to be accessed by different names. Links may be hard or soft. A hard link creates two names for the same file, and a soft, or symbolic, link creates a second file co to jest.
Przykład LOCKFILE użycie :
Jak użyć Create a link between two files. This is the same as the ln command, but it has no error checking because it uses the link( ) system call directly słownik.
Przykład LOCKFILE użycie :
Jak użyć spool queue for status of print jobs. For each job, display username, rank in the queue, filenames, job number, and total file size (in bytes). We document the CUPS printing system here; other czym jest.