Last active
January 5, 2025 02:29
-
-
Save dewomser/ccf965d4c28d7c6d9c8e3e73c0ac3800 to your computer and use it in GitHub Desktop.
Bash und Webdav und Nextcloud. Eine Übung
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Username und Passwort kann auch in ~/.netrc hinterlegt werden. | |
# -n, --netrc tells curl to look for and use the .netrc file. | |
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