github.com/ryanslade/nomad@v0.2.4-0.20160128061903-fc95782f2089/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` family of commands allows a user to navigate an allocation directory on a Nomad
    12  client. The following subcommands are available - `cat`, `ls` and `stat`
    13  
    14  `cat`: Reads contents of files and writes them to the standard output.
    15  `ls`: Displays the name of a file and directories and their associated information.
    16  `stat`: Displays information about a file.
    17  
    18  ## Usage 
    19  
    20  ```
    21  nomad fs ls <alloc-id> <path>
    22  nomad fs stat <alloc-id> <path>
    23  nomad fs cat <alloc-id> <path>
    24  ```
    25  
    26  A valid allocation id is necessary and the path is relative to the root of the allocation directory.
    27  The path is optional and it defaults to `/` of the allocation directory
    28  
    29  ## Examples
    30  
    31  $ nomad fs ls eb17e557
    32  Mode        Size  Modfied Time         Name
    33  drwxrwxr-x  4096  28 Jan 16 05:39 UTC  alloc/
    34  drwxrwxr-x  4096  28 Jan 16 05:39 UTC  redis/
    35  -rw-rw-r--  0     28 Jan 16 05:39 UTC  redis_exit_status
    36  
    37  
    38  $ nomad fs ls redis/local
    39  Mode        Size  Modfied Time         Name
    40  -rw-rw-rw-  0     28 Jan 16 05:39 UTC  redis.stderr
    41  -rw-rw-rw-  17    28 Jan 16 05:39 UTC  redis.stdout
    42  
    43  
    44  $ nomad fs stat redis/local/redis.stdout
    45  Mode        Size  Modified Time        Name
    46  -rw-rw-rw-  17    28 Jan 16 05:39 UTC  redis.stdout
    47  
    48  
    49  $ nomad fs cat redis/local/redis.stdout 
    50  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
    51  6710:M 27 Jan 22:04:03.795 * Increased maximum number of open files to 10032 (it was originally set to 256).
    52