Cadaver

A command-line WebDAV client for Unix.

cadaver supports file upload, download, on-screen display, namespace operations (move and copy), collection creation and deletion, and locking operations. Its operation is similar to the standard BSD ftp client and the Samba Project’s smbclient. A user familiar with these tools should be quite comfortable with cadaver. cadaver supports automatically logging in to servers requiring authentication via a .netrc file.

Usage

Usage: cadaver [-trp[-r file][-p host[:port]]][-V][-h] URL

OptionDescription
-t, --tolerantAllow cd/open into non-WebDAV enabled collection; use if the server or proxy has WebDAV compliance problems.
-r, --rcfile=fileUse this rcfile rather than the default of ~/.cadaverrc.
-p, --proxy=host[:port]Connect using the proxy host host and optional proxy port port.

Commands

CommandDescription
ls [path]List contents of current [or other] collection
cd pathChange to specified collection
pwdDisplay name of current collection
put local [remote]Upload local file
get remote [local]Download remote resource
mget remote...Download many remote resources
mput local...Upload many local files
edit resourceEdit given resource
less remote...Display remote resource through pager
mkcol remote...Create remote collection(s)
cat remote...Display remote resource(s)
delete remote...Delete non-collection resource(s)
rmcol remote...Delete remote collections and ALL contents
copy source... destCopy resource(s) from source to dest
move source... destMove resource(s) from source to dest
lock resourceLock given resource
unlock resourceUnlock given resource
discover resourceDisplay lock information for resource
steal resourceSteal lock token for resource
showlocksDisplay list of owned locks
propnames resNames of properties defined on resource
chexec [+/-] remoteChange isexecutable property of resource
propget res [propname]Retrieve properties of resource
propset res propname valueSet property on resource
set [option] [value]Set an option, or display options
open URLOpen connection to given URL
closeClose current connection
quitExit program
unset [option] [value]Unsets or clears value from option
lcd [directory]Change local working directory
lls [options]Display local directory listing
lpwdPrint local working directory
logoutLogout of authentication session
help [command]Display help message

.netrc FILE

The file ~/.netrc may be used to automatically login to a server requiring authentication. The following tokens (separated by spaces, tabs or newlines) may be used:

  • machine host: Identify a remote machine host which is compared with the hostname given on the command line or as an argument to the open command. Any subsequent tokens up to the end of file or the next machine or default token are associated with this entry.
  • default: This is equivalent to the machine token but matches any hostname. Only one default token may be used and it must be after all machine tokens.
  • login username: Specifies the username to use when logging in to the remote machine.
  • password string, passwd string: Specifies the password to use when logging in to the remote machine.

Any other tokens are ignored.