Curl is a command line tool for doing all sorts of URL manipulations and transfers, but this particular post will focus on how to use curl for managing (read/ delete/ rename/ upload) files on Webdav Server. While the second part of the post will cover implementation of Two Factor Authentication for the same. I'll assume that you know how to execute 'curl' command using terminal and invoke 'curl --help' or 'curl --manual' to get basic information about it.
Assume we have following Data:
Webdav URL: https://example.com/webdav
Username: user
Password: pass
Note: It is recommended to read article completely (both management and curl options) before implementation.