Cadaver

From aldeid
Jump to navigation Jump to search

Description

Cadaver is a command-line WebDAV client for Unix.

Installation

On Fedora:

$ sudo dnf install cadaver

Usage

Syntax and options

Usage: cadaver [OPTIONS] http://hostname[:port]/path
  Port defaults to 80, path defaults to '/'
Options:
  -t, --tolerant            Allow cd/open into non-WebDAV enabled collection.
  -r, --rcfile=FILE         Read script from FILE instead of ~/.cadaverrc.
  -p, --proxy=PROXY[:PORT]  Use proxy host PROXY and optional proxy port PORT.
  -V, --version             Display version information.
  -h, --help                Display this help message.
Please send bug reports and feature requests to <[email protected]>

Commands

dav:!> help
Available commands: 
 ls         cd         pwd        put        get        mget       mput       
 edit       less       mkcol      cat        delete     rmcol      copy       
 move       lock       unlock     discover   steal      showlocks  version    
 checkin    checkout   uncheckout history    label      propnames  chexec     
 propget    propdel    propset    search     set        open       close      
 echo       quit       unset      lcd        lls        lpwd       logout     
 help       describe   about      
Aliases: rm=delete, mkdir=mkcol, mv=move, cp=copy, more=less, quit=exit=bye

Examples

List files

$ cadaver http://10.10.19.245/webdav
Authentication required for webdav on server `10.10.19.245':
Username: wampp
Password: xampp
dav:/webdav/> ls
Listing collection `/webdav/': succeeded.
       nc.php                                 0  Jun 24 22:43
       passwd.dav                            44  Aug 26  2019
       shell.php                           5491  Jun 24 22:47

Put a file on a webdav server

$ cadaver http://10.10.19.245/webdav
Authentication required for webdav on server `10.10.19.245':
Username: wampp
Password: xampp
dav:/webdav/> put shell.php
Uploading shell.php to `/webdav/shell.php':
Progress: [=============================>] 100.0% of 5491 bytes succeeded.
dav:/webdav/> quit
Connection to `10.10.19.245' closed.

Remove files

Use cadaver:

$ cadaver http://10.10.19.245/webdav
Authentication required for webdav on server `10.10.19.245':
Username: wampp
Password: xampp
dav:/webdav/> ls
Listing collection `/webdav/': succeeded.
        nc.php                                 0  Jun 24 22:43
        passwd.dav                            44  Aug 26  2019
        shell.php                           5491  Jun 24 22:47
dav:/webdav/> rm nc.php
Deleting `nc.php': succeeded.
dav:/webdav/> ls
Listing collection `/webdav/': succeeded.
        passwd.dav                            44  Aug 26  2019
        shell.php                           5491  Jun 24 22:47
dav:/webdav/>