diff --git a/command/fs.go b/command/fs.go index b5b537fb205..af252bcc366 100644 --- a/command/fs.go +++ b/command/fs.go @@ -20,16 +20,14 @@ func (f *FSCommand) Help() string { helpText := ` Usage: nomad fs - fs displays either the contents of an allocation directory for the passed allocation, + fs displays either the contents of an allocation directory for the passed allocation, or displays the file at the given path. The path is relative to the root of the alloc dir and defaults to root if unspecified. - General Options: +General Options: ` + generalOptionsUsage() + ` -Fs Options: - -H Machine friendly output. @@ -65,7 +63,7 @@ func (f *FSCommand) Run(args []string) int { args = flags.Args() if len(args) < 1 { - f.Ui.Error("allocation id is a required parameter") + f.Ui.Error("allocation id or -job is required") return 1 } diff --git a/website/source/docs/commands/fs.html.md.erb b/website/source/docs/commands/fs.html.md.erb index 206722aed03..aca165d415a 100644 --- a/website/source/docs/commands/fs.html.md.erb +++ b/website/source/docs/commands/fs.html.md.erb @@ -13,13 +13,13 @@ client. The following functionalities are available - `cat`, `ls` and `stat` `cat`: If the target path is a file, Nomad will cat the target path. `ls`: If the target path is a directory, Nomad displays the name of a file and directories and their associated information. -`stat`: If the `-s` flag is used, Nomad will Display information about a file. +`stat`: If the `-stat` flag is used, Nomad will Display information about a file. ## Usage ``` nomad fs -nomad fs -s +nomad fs -stat ``` A valid allocation id is necessary unless `-job` is specified and the path is relative to the root of the allocation directory. @@ -40,7 +40,7 @@ Mode Size Modfied Time Name -rw-rw-rw- 17 28 Jan 16 05:39 UTC redis.stdout -$ nomad fs -s redis/local/redis.stdout +$ nomad fs -stat redis/local/redis.stdout Mode Size Modified Time Name -rw-rw-rw- 17 28 Jan 16 05:39 UTC redis.stdout