Redirect Command Output to a File

Top  Previous  Next

All S3Express commands support the parameter -tofile:filename to redirect the output from the screen to a file.
 
When the -tofile parameter is used, the output of a command is redirected from the screen to a file. If the file already exists, it is overwritten. For example:

ls mybucket -s -tofile:c:\output.txt

put c:\folder\ mybucket -tofile:x:\folder\output.txt

 

If no file path is specified, but only the file name, then the file is created in the current directory:

ls mybucket -s -tofile:output.txt

 
To append the output to an existing file, add a '+' at the end of the file name, e.g.:

ls mybucket -s -tofile:output.txt+

 

Alternatively, you can also redirect the whole program output to a file using the command line, e.g.

S3Express "put c:\folder\* bucket -onlydiff" "ls bucket" q > output.txt

or to append to an existing file:

S3Express "put c:\folder\* bucket -onlydiff" "ls bucket" q >> output.txt