Skip to content

Instantly share code, notes, and snippets.

@bahamas10
Last active December 30, 2015 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bahamas10/7899386 to your computer and use it in GitHub Desktop.
Save bahamas10/7899386 to your computer and use it in GitHub Desktop.
mput etag

make a file called file and ensure it does NOT exist in manta

$ echo data > file 
$ mrm ~~/stor/file
mrm: ResourceNotFoundError: /bahamas10/stor/file was not found

try to put the file with if-none-match

$ mput -H 'if-none-match: *' -f file ~~/stor/file
mput: Cannot write because HTTP precondition not met.
$ mput -f file ~~/stor/file
/bahamas10/stor/file                             [=============================================================================================================>] 100%       5B                  
$ mput -H 'if-none-match: *' -f file ~~/stor/file
mput: Cannot write because HTTP precondition not met.

try to put the file with if-match

$ mrm ~~/stor/file
$ mput -H 'if-match: *' -f file ~~/stor/file
/bahamas10/stor/file                             [=============================================================================================================>] 100%       5B                  
$ mput -H 'if-match: *' -f file ~~/stor/file
/bahamas10/stor/file                             [=============================================================================================================>] 100%       5B     
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment