AARNET CloudStor using curl from Command Line

AARNET CloudStor using curl from Command Line

You can use the command line to interface with CloudStor:

curl -O --user "[email protected]" https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/filename.txt

You can supply a password like so:

curl --user "[email protected]:password" https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/filename.txt

curl -T /path/to/file/to/upload --user "[email protected]" https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/

curl -X DELETE --user "[email protected]" https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/file_or_directory

List Contents of Directory:
curl -X PROPFIND --user "[email protected]" https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/ | grep -Po '(?<=/plus/remote.php/webdav/).+?(?=<)'

The grep command cleans up the XML into something nice.
-P for Perl Regex
-o for only print out what was matched.

Make Directory:
curl -X MKCOL --user "[email protected]" https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/dirname

Cool Stuff:

Download all files in Directory (Not Recursive):
curl -X PROPFIND --user "[email protected]" https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/ | grep -Po '(?<=/plus/remote.php/webdav/).+?(?=<)' | while read line; do curl -O --user "[email protected]" "https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/$line"; done

One thought on “AARNET CloudStor using curl from Command Line

  1. This is very useful, thankyou for your help. Do you also know how to upload a directory and its contents to Cloudstor?

Leave a Reply

Your email address will not be published. Required fields are marked *