LinuxCommandLibrary

cadaver

Access and manage WebDAV servers

TLDR

Connect to the server , open the root collection

$ cadaver [http://dav.example.com/]
copy

Connect to a server using a specific port and open the collection /foo/bar/
$ cadaver [http://dav.example.com:8022/foo/bar/]
copy

Connect to a server using SSL
$ cadaver [https://davs.example.com/]
copy

SYNOPSIS

cadaver [OPTIONS] [URL]
If no URL is provided on the command line, cadaver enters an interactive shell session where the user can then use the open command to connect to a WebDAV server.

PARAMETERS

-D
    Enables debugging output, providing detailed information about HTTP requests and responses, which can be useful for troubleshooting connection or transfer issues.

-t <timeout>
    Sets the HTTP request timeout in seconds. A value of 0 indicates no timeout, meaning the command will wait indefinitely for a response.

-V, --version
    Displays the version information of the cadaver client and then exits.

-h, --help
    Displays a brief help message with command-line options and then exits.

DESCRIPTION

cadaver is an open-source, command-line client designed for interacting with WebDAV (Web-based Distributed Authoring and Versioning) servers. WebDAV is an extension to HTTP that enables clients to perform remote web content authoring operations directly on a web server. Functionally similar to the traditional ftp client, cadaver provides an interactive shell environment. Within this shell, users can perform a wide range of file management tasks such as browsing directories, uploading and downloading files, creating and deleting directories, and moving or renaming files and folders. It supports various HTTP/1.1 authentication methods, including basic and digest, and is capable of establishing secure connections over SSL/TLS. cadaver is particularly useful for managing remote web content or accessing cloud storage services that expose a WebDAV interface, offering a powerful text-based alternative to graphical clients.

CAVEATS

As a command-line utility, cadaver operates without a graphical user interface, which may require users to be comfortable with terminal-based interactions.
Authentication credentials for WebDAV servers may need to be entered interactively during a session or managed through external scripts for automation.
When connecting over plain HTTP without SSL/TLS, sensitive data transferred via cadaver is not encrypted and could be intercepted.
Compatibility with various WebDAV server implementations can sometimes be inconsistent, and certain advanced WebDAV features might not be fully supported by all servers or by cadaver itself.

INTERACTIVE MODE COMMANDS

Once connected to a WebDAV server, cadaver offers an interactive prompt where users can execute various commands:
ls: Lists the contents of the current remote directory.
cd <directory>: Changes the current remote directory.
get <remote-file>: Downloads a specified file from the server to the local machine.
put <local-file>: Uploads a specified local file to the remote server.
mkdir <directory>: Creates a new directory on the remote server.
rm <file>: Deletes a file on the remote server.
mv <source> <destination>: Moves or renames a file or directory on the remote server.
cp <source> <destination>: Copies a file or directory on the remote server.
open <URL>: Connects to a new WebDAV URL from within the session.
exit or quit: Terminates the cadaver session.

HISTORY

cadaver was developed to address the need for a dedicated command-line client for WebDAV, providing an interactive interface that mirrors the functionality of established FTP clients. Its creation aimed to simplify remote web content authoring and management directly from the terminal, making it an essential tool for developers and system administrators working with WebDAV-enabled resources. The project has focused on providing robust file management capabilities over the WebDAV protocol since its inception.

SEE ALSO

curl(1), davfs2(8), wget(1), ftp(1)

Copied to clipboard