Skip to content

Instantly share code, notes, and snippets.

@dewomser
Last active August 21, 2024 20:53
Show Gist options
  • Save dewomser/ccf965d4c28d7c6d9c8e3e73c0ac3800 to your computer and use it in GitHub Desktop.
Save dewomser/ccf965d4c28d7c6d9c8e3e73c0ac3800 to your computer and use it in GitHub Desktop.
Bash und Webdav und Nextcloud. Eine Übung
#!/bin/bash
echo "hin und her test" > test.txt
curl --user 'user:PW' -T 'test.txt' 'https://nc.my-nextcloud.de/remote.php/webdav/'
rm test.txt
curl --user 'user:PW' -X GET 'https://nc.my-nextcloud.de/remote.php/webdav/test.txt' -o 'test.txt'
curl --user 'user:PW' -X DELETE 'https://nc.my-nextcloud.de/remote.php/webdav/test.txt'
cat test.txt
rm test.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment