github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/commands/lockfile.md (about)

     1  # `lockfile`
     2  
     3  > Create and manage lock files
     4  
     5  ## Description
     6  
     7  `lockfile` is used to create and manage lock files
     8  
     9  ## Usage
    10  
    11  Create a lock file with the name `identifier`
    12  
    13  ```
    14  lockfile lock identifier
    15  ```
    16  
    17  Delete a lock file with the name `identifier`
    18  
    19  ```
    20  lockfile unlock identifier
    21  ```
    22  
    23  Wait until lock file with the name `identifier` has been deleted
    24  
    25  ```
    26  lockfile wait identifier
    27  ```
    28  
    29  Output the the file name and path of a lock file with the name `identifier`
    30  
    31  ```
    32  lockfile path identifier -> <stdout>
    33  ```
    34  
    35  ## Examples
    36  
    37  ```
    38  lockfile lock example
    39  out "lock file created: ${lockfile path example}"
    40  
    41  bg {
    42      sleep 10
    43      lockfile unlock example
    44  }
    45  
    46  out "waiting for lock file to be deleted (sleep 10 seconds)...."
    47  lockfile wait example
    48  out "lock file gone!"
    49  ```
    50  
    51  ## See Also
    52  
    53  * [`bg`](../commands/bg.md):
    54    Run processes in the background
    55  * [`out`](../commands/out.md):
    56    Print a string to the STDOUT with a trailing new line character
    57  
    58  <hr/>
    59  
    60  This document was generated from [builtins/core/io/lockfile_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/core/io/lockfile_doc.yaml).