<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>dave -- DAV Explorer</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body style="background-color: white"> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#options">OPTIONS</a></li> <li><a href="#commands">COMMANDS</a></li> <li><a href="#getting_help">GETTING HELP</a></li> <li><a href="#installation">INSTALLATION</a></li> <li><a href="#what_platforms_will_it_work_on">WHAT PLATFORMS WILL IT WORK ON?</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#author_and_copyright">AUTHOR AND COPYRIGHT</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>dave -- DAV Explorer</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <p>dave [OPTIONS] URL</p> <p>E.g.</p> <pre> $ dave -u pcollins -p mypass www.host.org/dav_dir/ ... dave> get file.txt</pre> <p>Use "dave -h" to get help on options</p> <p>Use "perldoc dave" for the whole manpage.</p> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>dave is a powerful command-line program for interacting with WebDAV-enabled webservers. With dave you can:</p> <ul> <li><strong><a name="get_and_put_files" class="item">get and put files</a></strong> <li><strong><a name="make_directories_on_a_remote_webserver" class="item">make directories on a remote webserver</a></strong> <li><strong><a name="remove_files_and_directories_from_a_remote_webserver" class="item">remove files and directories from a remote webserver</a></strong> <li><strong><a name="edit_a_file_on_the_webserver_with_a_single_command" class="item">edit a file on the webserver with a single command</a></strong> <li><strong><a name="recursively_get_a_remote_directory" class="item">recursively get a remote directory</a></strong> <li><strong><a name="recursively_put_a_local_directory" class="item">recursively put a local directory</a></strong> <li><strong><a name="lock_and_unlock_remote_files_and_directories" class="item">lock and unlock remote files and directories</a></strong> <li><strong><a name="securely_transfer_over_https" class="item">securely transfer over https</a></strong> <li><strong><a name="authenticate_using_the_safer_digest_authentication" class="item">authenticate using the safer Digest authentication</a></strong> </ul> <p>Dave is a part of the PerlDAV project (http://www.webdav.org/perldav/) and is built on top of the HTTP::DAV perl API.</p> <p>If you would like to script webdav interactions in Perl checkout the HTTP::DAV API as it's commands are the basis for dave's.</p> <p> </p> <hr /> <h1><a name="options">OPTIONS</a></h1> <dl> <dt><strong><a name="debug_n" class="item">-debug N</a></strong> <dd> <p>Sets the debug level to N. 0=none. 3=noisy.</p> </dd> </li> <dt><strong><a name="h" class="item">-h</a></strong> <dd> <p>Prints basic help and options.</p> </dd> </li> <dt><strong><a name="man" class="item">-man</a></strong> <dd> <p>Prints the full manual (equivalent to perldoc dave).</p> </dd> <dd> <p>You will need to use a pager like "more" or "less".</p> </dd> <dd> <pre> e.g. dave -man |less</pre> </dd> </li> <dt><strong><a name="p_password" class="item">-p <password></a></strong> <dd> <p>Sets the password to be used for the URL.</p> </dd> <dd> <p>You must also supply a user. See -u.</p> </dd> </li> <dt><strong><a name="u_username" class="item">-u <username></a></strong> <dd> <p>Sets the username to be used for the URL.</p> </dd> <dd> <p>You must also supply a pass. See -p.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name="commands">COMMANDS</a></h1> <dl> <dt><strong><a name="cd" class="item"><strong>cd URL</strong></a></strong> <dd> <p>changes directories</p> </dd> <dd> <pre> dave> open host.org/dav_dir/ dave> cd dir1 dave> cd ../dir2</pre> </dd> </li> <dt><strong><a name="cat" class="item"><strong>cat URL</strong></a></strong> <dd> <p>shows the contents of a remote file</p> </dd> <dd> <pre> dave> open host.org/dav_dir/ dave> cat index.html</pre> </dd> <dd> <p>Note: you cannot cat a directory (collection).</p> </dd> </li> <dt><strong><a name="cp" class="item"><strong>cp</strong></a></strong> <dt><strong><a name="copy_source_url_dest_url" class="item"><strong>copy SOURCE_URL DEST_URL</strong></a></strong> <dd> <p>copies one remote resource to another</p> </dd> <dd> <pre> dave> open host.org/dav_dir/</pre> </dd> <dd> <p>Create a copy of dir1/ as dav2/</p> </dd> <dd> <pre> dave> cp dir1 dav2</pre> </dd> <dd> <p>Create a copy of dir1/file.txt as dav2/file.txt</p> </dd> <dd> <pre> dave> cd dir1 dave> copy file.txt ../dav2</pre> </dd> <dd> <p>Create a copy of file.txt as ../dav2/new_file.txt</p> </dd> <dd> <pre> dave> copy file.txt dav2/new_file.txt</pre> </dd> <dd> <p>Aliases: cp</p> </dd> </li> <dt><strong><a name="rmdir" class="item"><strong>rmdir URL</strong></a></strong> <dt><strong><a name="rm" class="item"><strong>rm URL</strong></a></strong> <dt><strong><a name="delete" class="item"><strong>delete URL</strong></a></strong> <dd> <p>deletes a remote resource</p> </dd> <dd> <pre> dave> open host.org/dav_dir/ dave> delete index.html dave> rmdir ./dir1 dave> delete /dav_dir/dir2/ dave> delete /dav_dir/*.html</pre> </dd> <dd> <p>This command recursively deletes directories. BE CAREFUL :)</p> </dd> <dd> <p>This command supported wildcards (globbing). See get.</p> </dd> <dd> <p>Aliases: rm, rmdir</p> </dd> </li> <dt><strong><a name="edit" class="item"><strong>edit URL</strong></a></strong> <dd> <p>edits the contents of a remote file</p> </dd> <dd> <pre> dave> open host.org/dav_dir/ dave> edit index.html</pre> </dd> <dd> <p>Edit is equivalent to the following sequence of commands:</p> </dd> <dd> <pre> LOCK index.html (if allowed) GET index.html /tmp/dave.perldav.421341234124 sh $EDITOR /tmp/dave.perldav.421341234124 PUT index.html (if modified) UNLOCK index.html (if locked)</pre> </dd> <dd> <p>Where $EDITOR is determined from the environment variables DAV_EDITOR or EDITOR.</p> </dd> <dd> <p>If DAV_EDITOR is set, it will use that, otherwise it will use EDITOR. If neither variables are set, then "vi" will be used.</p> </dd> <dd> <p>Notes:</p> </dd> <dd> <p>The lock only lasts for 10 hours.</p> </dd> <dd> <p>You cannot edit a directory (collection).</p> </dd> <dd> <p>The temporary save directory is editable by editing dave and changing TMP_DIR</p> </dd> </li> <dt><strong><a name="get_url_file" class="item"><strong>get URL [FILE]</strong></a></strong> <dd> <p>downloads the file or directory at URL</p> </dd> <dd> <p>If FILE is not specified it will be saved to your current working directory using the same name as the remote name.</p> </dd> <dd> <pre> dave> open host.org/dav_dir/</pre> </dd> <dd> <p>Recursively get remote my_dir/ to .</p> </dd> <dd> <pre> dave> get my_dir/</pre> </dd> <dd> <p>Recursively get remote my_dir/ to /tmp/my_dir/</p> </dd> <dd> <pre> dave> get my_dir /tmp</pre> </dd> <dd> <p>Get remote my_dir/index.html to /tmp/index.html</p> </dd> <dd> <pre> dave> get /dav_dir/my_dir/index.html /tmp</pre> </dd> <dd> <p>Get remote index.html to /tmp/index1.html</p> </dd> <dd> <pre> dave> get index.html /tmp/index1.html</pre> </dd> <dd> <p>Use globs and save to /tmp</p> </dd> <dd> <pre> dave> get index* /tmp # Gets index*.html, index*.txt, etc. dave> get index*.html /tmp/index1.html # Gets index*.html dave> get index[12].htm? # Gets file1 and file2, .htm and .html</pre> </dd> </li> <dt><strong><a name="cmd" class="item"><strong>? [CMD]</strong></a></strong> <dt><strong><a name="h_cmd" class="item"><strong>h [CMD]</strong></a></strong> <dt><strong><a name="help_cmd" class="item"><strong>help [CMD]</strong></a></strong> <dd> <p>prints list of commands or help for CMD</p> </dd> <dd> <pre> dave> ?</pre> </dd> <dd> <pre> dave> help get</pre> </dd> <dd> <p>Aliases: ?, h</p> </dd> </li> <dt><strong><a name="lcd_dir" class="item"><strong>lcd [DIR]</strong></a></strong> <dd> <p>changes local directory</p> </dd> <dd> <pre> dave> lcd /tmp</pre> </dd> </li> <dt><strong><a name="lls_dir" class="item"><strong>lls [DIR]</strong></a></strong> <dd> <p>lists local directory contents</p> </dd> <dd> <pre> dave> lcd /tmp dave> lls dave> lls /home</pre> </dd> <dd> <p>This command simply execs the local ls command and is equivalent to "!ls"</p> </dd> </li> <dt><strong><a name="dir_url" class="item"><strong>dir [URL]</strong></a></strong> <dt><strong><a name="ls_url" class="item"><strong>ls [URL]</strong></a></strong> <dd> <p>lists remote directory contents or file props</p> </dd> <dd> <pre> dave> ls Listing of <a href="http://host.org/dav_dir/">http://host.org/dav_dir/</a> ./ Aug 29 02:26 <dir> mtx_0.04.tar.gz 52640 Aug 11 11:45 index.html 4580 Aug 11 11:45 index0.04.html 4936 Nov 11 2000 mydir/ Aug 19 21:14 <dir>,<locked></pre> </dd> <dd> <pre> dave> ls index.html URL: <a href="http://www.webdav.org/perldav/index.html">http://www.webdav.org/perldav/index.html</a> Content-type: text/html Creation date: Sun Aug 12 21:58:02 2001 Last modified: Size: 4580 bytes Locks supported: write/exclusive write/shared Locks:</pre> </dd> <dd> <p>Use propfind to get a similar printout of a collection (directory).</p> </dd> <dd> <p>Aliases: dir</p> </dd> </li> <dt><strong><a name="lock_url_timeout_depth" class="item"><strong>lock [URL [TIMEOUT] [DEPTH]]</strong></a></strong> <dd> <p>locks a resource</p> </dd> <dd> <p>Without a URL you will lock the current remote collection.</p> </dd> <dd> <p>TIMEOUT can be any of the following formats: 30s 30 seconds from now 10m ten minutes from now 1h one hour from now 1d tomorrow 3M in three months 10y in ten years time 2000-02-31 00:40:33 2000-02-31</p> </dd> <dd> <p>Default is an infinite timeout</p> </dd> <dd> <p>See perldoc <code>HTTP::DAV::Resource</code> for more information about timeouts.</p> </dd> <dd> <p>DEPTH can be either "0" or "infinity" (default)</p> </dd> <dd> <p>Seeting the lock Scope and Type is not currently implemented. Let me know if you need it as it shouldn't be too much effort.</p> </dd> </li> <dt><strong><a name="mkdir" class="item"><strong>mkdir URL</strong></a></strong> <dt><strong><a name="mkcol" class="item"><strong>mkcol URL</strong></a></strong> <dd> <p>make a remote collection (directory)</p> </dd> <dd> <pre> dave> open host.org/dav_dir/ dave> mkcol new_dir dave> mkdir /dav_dir/new_dir</pre> </dd> <dd> <p>Aliases: mkdir</p> </dd> </li> <dt><strong><a name="mv" class="item"><strong>mv</strong></a></strong> <dt><strong><a name="move_source_url_dest_url" class="item"><strong>move SOURCE_URL DEST_URL</strong></a></strong> <dd> <p>moves a remote resource to another</p> </dd> <dd> <pre> dave> open host.org/dav_dir/</pre> </dd> <dd> <p>Move dir1/ to dav2/</p> </dd> <dd> <pre> dave> move dir1 dav2</pre> </dd> <dd> <p>Move file dir2/file.txt to ../file.txt</p> </dd> <dd> <pre> dave> cd dir2 dave> move file.txt ..</pre> </dd> <dd> <p>Move file.txt to dav2/new_file.txt</p> </dd> <dd> <pre> dave> move file.txt dav2/new_file.txt</pre> </dd> <dd> <p>Aliases: mv</p> </dd> </li> <dt><strong><a name="open" class="item"><strong>open URL</strong></a></strong> <dd> <p>connects to the WebDAV-enabled server at URL</p> </dd> <dd> <pre> dave> open host.org/dav_dir/</pre> </dd> <dd> <p>Note that if authorization details are required you will be prompted for them.</p> </dd> <dd> <p>https and Digest authorization are not currently supported. Please let me know if you need it.</p> </dd> </li> <dt><strong><a name="options_url" class="item"><strong>options [URL]</strong></a></strong> <dd> <p>show the HTTP methods allowed for a URL</p> </dd> <dd> <pre> dave> options index.html OPTIONS, GET, HEAD, POST, DELETE, TRACE, PROPFIND, PROPPATCH, COPY, MOVE, LOCK, UNLOCK</pre> </dd> <dd> <p>Note that Microsoft's IIS does not support LOCK on collections (directories). Nor does it support PROPPATCH.</p> </dd> </li> <dt><strong><a name="propfind_url" class="item"><strong>propfind [URL]</strong></a></strong> <dd> <p>show the properties of a resource</p> </dd> <dd> <pre> dave> propfind test URL: <a href="http://host.org/dav_dir/test/">http://host.org/dav_dir/test/</a> Content-type: httpd/unix-directory Creation date: Wed Aug 29 00:36:42 2001 Last modified: Size: bytes Locks supported: write/exclusive write/shared Locks:</pre> </dd> <dd> <p>Using ls will get you the same printout if you ls a file. But ls'ing a collection will show you the collections contents.</p> </dd> </li> <dt><strong><a name="put_file_url" class="item"><strong>put FILE [URL]</strong></a></strong> <dd> <p>uploads a local file or directory to URL or the currently opened location.</p> </dd> <dd> <p>If URL is an existing collection then the dir/file will be copied INTO that collection.</p> </dd> <dd> <pre> dave> open host.org/dav_dir/</pre> </dd> <dd> <p>Recursively put local my_dir/ to host.org/dav_dir/my_dir/:</p> </dd> <dd> <pre> dave> put my_dir/</pre> </dd> <dd> <p>Put local index.html to host.org/dav_dir/index1.html:</p> </dd> <dd> <pre> dave> put /tmp/index.html index1.html</pre> </dd> <dd> <p>Put * to remote directory</p> </dd> <dd> <pre> dave> put *</pre> </dd> <dd> <p>Put index[12].htm? to remote directory /dav_dir (/dav_dir must exist)</p> </dd> <dd> <pre> dave> put index[12].htm? /dav_dir</pre> </dd> <dd> <p>Put index[1234].htm? to remote directory /dav_dir (/dav_dir must exist)</p> </dd> <dd> <pre> dave> put index[1-4].htm? /dav_dir</pre> </dd> <dd> <p>Glob types supported are, * (matches any characters), ? (matches any one character), [...] (matches any characters in the set ...).</p> </dd> </li> <dt><strong><a name="pwd" class="item"><strong>pwd</strong></a></strong> <dd> <p>prints the currently opened URL (working directory)</p> </dd> <dd> <pre> dave> open host.org/dav_dir/ dave> cd new_dir/ dave> pwd <a href="http://host.org/dav_dir/new_dir/">http://host.org/dav_dir/new_dir/</a></pre> </dd> </li> <dt><strong><a name="q" class="item"><strong>q</strong></a></strong> <dt><strong><a name="bye" class="item"><strong>bye</strong></a></strong> <dt><strong><a name="quit" class="item"><strong>quit</strong></a></strong> <dd> <p>exits dave</p> </dd> <dd> <p>Note that dave does not unlock any locks created during your session.</p> </dd> <dd> <p>Aliases: q, quit</p> </dd> </li> <dt><strong><a name="set_url_property_value_namespace" class="item"><strong>set URL PROPERTY VALUE [NAMESPACE]</strong></a></strong> <dd> <p>sets a custom property on a resource</p> </dd> <dd> <pre> dave> set file.txt author "Patrick Collins" dave> set file.txt author "Patrick Collins" "mynamespace"</pre> </dd> <dd> <p>The NAMESPACE by default is "DAV:".</p> </dd> </li> <dt><strong><a name="_" class="item"><strong>!</strong></a></strong> <dt><strong><a name="sh" class="item"><strong>sh</strong></a></strong> <dd> <p>executes a local command (alias !)</p> </dd> <dd> <pre> dave> sh cat localfile dave> !gzip localfile.gz dave> ! "cat localfile | less"</pre> </dd> <dd> <p>Aliases: !</p> </dd> </li> <dt><strong><a name="showlocks" class="item"><strong>showlocks</strong></a></strong> <dd> <p>show my locks on a resource</p> </dd> <dd> <p>Shows any locked resources that you've locked in this session.</p> </dd> <dd> <p>See <code>propfind</code> if you'd like to see anyone's locks held against a particular resource.</p> </dd> </li> <dt><strong><a name="steal_url" class="item"><strong>steal [URL]</strong></a></strong> <dd> <p>remove ANY locks on a resource</p> </dd> <dd> <p>Useful if you accidentally forgot to unlock a resource from a previous session or if you think that somebody has forgotten to unlock a resource.</p> </dd> </li> <dt><strong><a name="unlock_url" class="item"><strong>unlock [URL]</strong></a></strong> <dd> <p>unlocks a resource</p> </dd> <dd> <p>Note that unlock will only unlock locks that you have created. Use steal if you want to forcefully unlock somebody else's lock.</p> </dd> </li> <dt><strong><a name="unset_url_property_namespace" class="item"><strong>unset URL PROPERTY [NAMESPACE]</strong></a></strong> <dd> <p>unsets a property from a resource</p> </dd> <dd> <pre> dave> unset file.txt author dave> unset file.txt author "mynamespace"</pre> </dd> <dd> <p>The NAMESPACE by default is "DAV:".</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name="getting_help">GETTING HELP</a></h1> <p>The perldav mailing list There is a mailing list for PerlDAV and dave for use by Developers and Users. Please see <a href="http://mailman.webdav.org/mailman/listinfo/perldav">http://mailman.webdav.org/mailman/listinfo/perldav</a></p> <p> </p> <hr /> <h1><a name="installation">INSTALLATION</a></h1> <p>dave is installed to /usr/local/bin by default when you install the PerlDAV library. See <a href="http://www.webdav.org/perldav/">http://www.webdav.org/perldav/</a> for installation details of PerlDAV.</p> <p> </p> <hr /> <h1><a name="what_platforms_will_it_work_on">WHAT PLATFORMS WILL IT WORK ON?</a></h1> <p>dave is pure perl so only needs Perl5.003 (or later) and the <code>PerlDAV</code> library to be installed.</p> <p>I have not ported dave to Windows but would like somebody to have a shot at it.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p>The <code>PerlDAV</code> perl API at <a href="http://www.webdav.org/perldav/">http://www.webdav.org/perldav/</a> or by typing "perldoc HTTP::DAV" on your command line.</p> <p> </p> <hr /> <h1><a name="author_and_copyright">AUTHOR AND COPYRIGHT</a></h1> <p>This module is Copyright (C) 2001 by</p> <pre> Patrick Collins G03 Gloucester Place, Kensington Sydney, Australia</pre> <pre> Email: pcollins@cpan.org Phone: +61 2 9663 4916</pre> <p>All rights reserved.</p> <p>You may distribute this module under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.</p> </body> </html>