How to use the command 'cadaver' (with examples)

How to use the command 'cadaver' (with examples)

Cadaver is a command-line WebDAV client for Unix-based systems. It allows users to connect to WebDAV servers and perform various operations, such as uploading and downloading files, creating directories, and deleting files.

Use case 1: Connect to the server and open the root collection

Code:

cadaver http://dav.example.com/

Motivation: By using this command, you can connect to a WebDAV server hosted at dav.example.com and open the root collection. This allows you to view the files and directories present in the root collection and perform operations on them.

Explanation:

  • cadaver is the command used to start the Cadaver WebDAV client.
  • http://dav.example.com/ is the URL of the WebDAV server. By specifying this URL as the argument, we are instructing Cadaver to connect to the server and open the root collection.

Example output:

dav:/$ ls
drwxr-xr-x    -    0 Apr 30 09:15 Documents
drwxr-xr-x    -    0 Apr 30 09:20 Pictures
drwxr-xr-x    -    0 Apr 30 09:25 Music

Use case 2: Connect to a server using a specific port and open a specific collection

Code:

cadaver http://dav.example.com:8022/foo/bar/

Motivation: If the WebDAV server is running on a non-standard port, you can specify the port number while connecting to the server. In this example, the server is running on port 8022, and we want to open the /foo/bar/ collection on that server.

Explanation:

  • http://dav.example.com:8022/foo/bar/ is the URL of the WebDAV server with the port number and the specific collection to open. By specifying this URL as the argument, Cadaver will connect to the server and open the /foo/bar/ collection.

Example output:

dav:/foo/bar/$ ls
-rw-r--r--    1    1000    1024 Apr 30 09:35 file1.txt
-rw-r--r--    1    1000    2048 Apr 30 09:40 file2.txt
drwxr-xr-x    -       0 Apr 30 09:45 docs

Use case 3: Connect to a server using SSL

Code:

cadaver https://davs.example.com/

Motivation: If the WebDAV server uses SSL (Secure Sockets Layer) for secure communication, you can connect to it using the https protocol. This ensures that the data transmitted between your machine and the server is encrypted and secure.

Explanation:

  • https://davs.example.com/ is the URL of the WebDAV server using the https protocol. Cadaver will establish a secure connection with the server and open the root collection.

Example output:

davs:/$ ls
drwxr-xr-x    -    0 Apr 30 09:15 Documents
drwxr-xr-x    -    0 Apr 30 09:20 Pictures
drwxr-xr-x    -    0 Apr 30 09:25 Music

Conclusion:

The Cadaver command-line WebDAV client provides a convenient way to interact with WebDAV servers. Whether you need to connect to a server, open specific collections, or establish a secure SSL connection, Cadaver has you covered. By following the provided examples, you can easily utilize Cadaver for your WebDAV operations.

Related Posts

Getting Information about STLink and STM32 Devices (with examples)

Getting Information about STLink and STM32 Devices (with examples)

1: Display amount of program memory available $ st-info --flash Motivation: This command allows you to quickly retrieve information about the program memory available on a connected STM32 device.

Read More
How to use the command 'zile' (with examples)

How to use the command 'zile' (with examples)

This article provides step-by-step instructions for utilizing the ‘zile’ command, a lightweight clone of the Emacs text editor.

Read More
IPython (with examples)

IPython (with examples)

IPython is an upgraded version of the standard Python interactive shell.

Read More