github.com/dkerwin/nomad@v0.3.3-0.20160525181927-74554135514b/website/source/docs/commands/fs.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: fs"
     4  sidebar_current: "docs-commands-fs"
     5  description: >
     6    Introspect an allocation directory on a Nomad client
     7  ---
     8  
     9  # Command: fs
    10  
    11  The `fs` command allows a user to navigate an allocation directory on a Nomad
    12  client. The following functionalities are available - `cat`, `ls` and `stat`
    13  
    14  `cat`: If the target path is a file, Nomad will cat the target path.
    15  `ls`: If the target path is a directory, Nomad displays the name of a file and directories and their associated information.
    16  `stat`: If the `-stat` flag is used, Nomad will Display information about a file.
    17  
    18  ## Usage 
    19  
    20  ```
    21  nomad fs <alloc-id> <path>
    22  nomad fs -stat <alloc-id> <path>
    23  ```
    24  
    25  A valid allocation id is necessary unless `-job` is specified and the path is relative to the root of the allocation directory.
    26  The path is optional and it defaults to `/` of the allocation directory
    27  
    28  ## Examples
    29  
    30  $ nomad fs eb17e557
    31  Mode        Size  Modfied Time         Name
    32  drwxrwxr-x  4096  28 Jan 16 05:39 UTC  alloc/
    33  drwxrwxr-x  4096  28 Jan 16 05:39 UTC  redis/
    34  -rw-rw-r--  0     28 Jan 16 05:39 UTC  redis_exit_status
    35  
    36  
    37  $ nomad fs redis/local
    38  Mode        Size  Modfied Time         Name
    39  -rw-rw-rw-  0     28 Jan 16 05:39 UTC  redis.stderr
    40  -rw-rw-rw-  17    28 Jan 16 05:39 UTC  redis.stdout
    41  
    42  
    43  $ nomad fs -stat redis/local/redis.stdout
    44  Mode        Size  Modified Time        Name
    45  -rw-rw-rw-  17    28 Jan 16 05:39 UTC  redis.stdout
    46  
    47  
    48  $ nomad fs redis/local/redis.stdout 
    49  6710:C 27 Jan 22:04:03.794 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
    50  6710:M 27 Jan 22:04:03.795 * Increased maximum number of open files to 10032 (it was originally set to 256).
    51  
    52  ## Using Job-ID instead of Alloc-ID
    53  
    54  Passing `-job` into one of the `fs` commands will allow the `fs` command to randomly select an allocation ID from the specified job.
    55  
    56  ```
    57  nomad fs -job <job-id> <path>
    58  ```
    59  
    60  Nomad will prefer to select a running allocation ID for the job, but if no running allocations for the job are found, Nomad will use a dead allocation.
    61  
    62  This can be useful for debugging a job that has multiple allocations, and it's not really required to use a specific allocation ID.