.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DAVE 1p" .TH DAVE 1p "2022-05-28" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dave \- DAV Explorer .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& dave [OPTIONS] URL .Ve .PP E.g. .PP .Vb 3 \& $ dave \-u pcollins \-p mypass www.host.org/dav_dir/ \& ... \& dave> get file.txt .Ve .PP Use \f(CW\*(C`dave \-h\*(C'\fR to get help on options. .PP Use \f(CW\*(C`perldoc dave\*(C'\fR for the whole manpage. .SH "DESCRIPTION" .IX Header "DESCRIPTION" dave is a powerful command-line program for interacting with WebDAV-enabled webservers. With dave you can: .IP "\(bu" 4 get and put files .IP "\(bu" 4 make directories on a remote webserver .IP "\(bu" 4 remove files and directories from a remote webserver .IP "\(bu" 4 edit a file on the webserver with a single command .IP "\(bu" 4 recursively get a remote directory .IP "\(bu" 4 recursively put a local directory .IP "\(bu" 4 lock and unlock remote files and directories .IP "\(bu" 4 securely transfer over https .IP "\(bu" 4 authenticate using the safer Digest authentication .PP Dave is a part of the PerlDAV project (http://www.webdav.org/perldav/) and is built on top of the \s-1HTTP::DAV\s0 perl \s-1API.\s0 .PP If you would like to script webdav interactions in Perl checkout the \s-1HTTP::DAV API\s0 as it's commands are the basis for dave's. .SH "OPTIONS" .IX Header "OPTIONS" .ie n .IP """\-debug N""" 4 .el .IP "\f(CW\-debug N\fR" 4 .IX Item "-debug N" Sets the debug level to N. 0=none. 3=noisy. .ie n .IP """\-h""" 4 .el .IP "\f(CW\-h\fR" 4 .IX Item "-h" Prints basic help and options. .ie n .IP """\-man""" 4 .el .IP "\f(CW\-man\fR" 4 .IX Item "-man" Prints the full manual (equivalent to perldoc dave). .Sp You will need to use a pager like \f(CW\*(C`more\*(C'\fR or \f(CW\*(C`less\*(C'\fR. e.g. .Sp .Vb 1 \& dave \-man |less .Ve .ie n .IP """\-p """ 4 .el .IP "\f(CW\-p \fR" 4 .IX Item "-p " Sets the password to be used for the \s-1URL.\s0 You must also supply a user. See \f(CW\*(C`\-u\*(C'\fR. .ie n .IP """\-u """ 4 .el .IP "\f(CW\-u \fR" 4 .IX Item "-u " Sets the username to be used for the \s-1URL.\s0 You must also supply a pass. See \f(CW\*(C`\-p\*(C'\fR. .ie n .IP """\-tmpdir /some/path""" 4 .el .IP "\f(CW\-tmpdir /some/path\fR" 4 .IX Item "-tmpdir /some/path" Create temporary files in \f(CW\*(C`/some/path\*(C'\fR instead of the default \f(CW\*(C`/tmp\*(C'\fR. .SH "COMMANDS" .IX Header "COMMANDS" .IP "\fBcd \s-1URL\s0\fR" 4 .IX Item "cd URL" changes directories .Sp .Vb 3 \& dave> open host.org/dav_dir/ \& dave> cd dir1 \& dave> cd ../dir2 .Ve .IP "\fBcat \s-1URL\s0\fR" 4 .IX Item "cat URL" shows the contents of a remote file .Sp .Vb 2 \& dave> open host.org/dav_dir/ \& dave> cat index.html .Ve .Sp Note: you cannot cat a directory (collection). .IP "\fBcp\fR" 4 .IX Item "cp" .PD 0 .IP "\fBcopy \s-1SOURCE_URL DEST_URL\s0\fR" 4 .IX Item "copy SOURCE_URL DEST_URL" .PD copies one remote resource to another .Sp .Vb 1 \& dave> open host.org/dav_dir/ .Ve .Sp Create a copy of dir1/ as dav2/ .Sp .Vb 1 \& dave> cp dir1 dav2 .Ve .Sp Create a copy of dir1/file.txt as dav2/file.txt .Sp .Vb 2 \& dave> cd dir1 \& dave> copy file.txt ../dav2 .Ve .Sp Create a copy of file.txt as ../dav2/new_file.txt .Sp .Vb 1 \& dave> copy file.txt dav2/new_file.txt .Ve .Sp Aliases: cp .IP "\fBrmdir \s-1URL\s0\fR" 4 .IX Item "rmdir URL" .PD 0 .IP "\fBrm \s-1URL\s0\fR" 4 .IX Item "rm URL" .IP "\fBdelete \s-1URL\s0\fR" 4 .IX Item "delete URL" .PD deletes a remote resource .Sp .Vb 5 \& dave> open host.org/dav_dir/ \& dave> delete index.html \& dave> rmdir ./dir1 \& dave> delete /dav_dir/dir2/ \& dave> delete /dav_dir/*.html .Ve .Sp This command recursively deletes directories. \s-1BE CAREFUL :\s0) .Sp This command supported wildcards (globbing). See get. .Sp Aliases: rm, rmdir .IP "\fBedit \s-1URL\s0\fR" 4 .IX Item "edit URL" edits the contents of a remote file .Sp .Vb 2 \& dave> open host.org/dav_dir/ \& dave> edit index.html .Ve .Sp Edit is equivalent to the following sequence of commands: .Sp .Vb 5 \& 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) .Ve .Sp Where \f(CW$EDITOR\fR is determined from the environment variables \&\s-1DAV_EDITOR\s0 or \s-1EDITOR.\s0 .Sp If \s-1DAV_EDITOR\s0 is set, it will use that, otherwise it will use \s-1EDITOR.\s0 If neither variables are set, then \*(L"vi\*(R" will be used. .Sp Notes: .Sp The lock only lasts for 10 hours. .Sp You cannot edit a directory (collection). .Sp The temporary save directory is editable by editing dave and changing \s-1TMP_DIR\s0 .IP "\fBget \s-1URL\s0 [\s-1FILE\s0]\fR" 4 .IX Item "get URL [FILE]" downloads the file or directory at \s-1URL\s0 .Sp If \s-1FILE\s0 is not specified it will be saved to your current working directory using the same name as the remote name. .Sp .Vb 1 \& dave> open host.org/dav_dir/ .Ve .Sp Recursively get remote my_dir/ to . .Sp .Vb 1 \& dave> get my_dir/ .Ve .Sp Recursively get remote my_dir/ to /tmp/my_dir/ .Sp .Vb 1 \& dave> get my_dir /tmp .Ve .Sp Get remote my_dir/index.html to /tmp/index.html .Sp .Vb 1 \& dave> get /dav_dir/my_dir/index.html /tmp .Ve .Sp Get remote index.html to /tmp/index1.html .Sp .Vb 1 \& dave> get index.html /tmp/index1.html .Ve .Sp Use globs and save to /tmp .Sp .Vb 3 \& 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 .Ve .IP "\fB? [\s-1CMD\s0]\fR" 4 .IX Item "? [CMD]" .PD 0 .IP "\fBh [\s-1CMD\s0]\fR" 4 .IX Item "h [CMD]" .IP "\fBhelp [\s-1CMD\s0]\fR" 4 .IX Item "help [CMD]" .PD prints list of commands or help for \s-1CMD\s0 .Sp .Vb 1 \& dave> ? \& \& dave> help get .Ve .Sp Aliases: ?, h .IP "\fBlcd [\s-1DIR\s0]\fR" 4 .IX Item "lcd [DIR]" changes local directory .Sp .Vb 1 \& dave> lcd /tmp .Ve .IP "\fBlls [\s-1DIR\s0]\fR" 4 .IX Item "lls [DIR]" lists local directory contents .Sp .Vb 3 \& dave> lcd /tmp \& dave> lls \& dave> lls /home .Ve .Sp This command simply execs the local ls command and is equivalent to \*(L"!ls\*(R" .IP "\fBdir [\s-1URL\s0]\fR" 4 .IX Item "dir [URL]" .PD 0 .IP "\fBls [\s-1URL\s0]\fR" 4 .IX Item "ls [URL]" .PD lists remote directory contents or file props .Sp .Vb 7 \& dave> ls \& Listing of http://host.org/dav_dir/ \& ./ Aug 29 02:26 \& 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 , \& \& dave> ls index.html \& URL: http://www.webdav.org/perldav/index.html \& 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: .Ve .Sp Use propfind to get a similar printout of a collection (directory). .Sp Aliases: dir .IP "\fBlock [\s-1URL\s0 [\s-1TIMEOUT\s0] [\s-1DEPTH\s0]]\fR" 4 .IX Item "lock [URL [TIMEOUT] [DEPTH]]" locks a resource .Sp Without a \s-1URL\s0 you will lock the current remote collection. .Sp \&\s-1TIMEOUT\s0 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 .Sp Default is an infinite timeout .Sp See perldoc \f(CW\*(C`HTTP::DAV::Resource\*(C'\fR for more information about timeouts. .Sp \&\s-1DEPTH\s0 can be either \*(L"0\*(R" or \*(L"infinity\*(R" (default) .Sp 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. .IP "\fBmkdir \s-1URL\s0\fR" 4 .IX Item "mkdir URL" .PD 0 .IP "\fBmkcol \s-1URL\s0\fR" 4 .IX Item "mkcol URL" .PD make a remote collection (directory) .Sp .Vb 3 \& dave> open host.org/dav_dir/ \& dave> mkcol new_dir \& dave> mkdir /dav_dir/new_dir .Ve .Sp Aliases: mkdir .IP "\fBmv\fR" 4 .IX Item "mv" .PD 0 .IP "\fBmove \s-1SOURCE_URL DEST_URL\s0\fR" 4 .IX Item "move SOURCE_URL DEST_URL" .PD moves a remote resource to another .Sp .Vb 1 \& dave> open host.org/dav_dir/ .Ve .Sp Move dir1/ to dav2/ .Sp .Vb 1 \& dave> move dir1 dav2 .Ve .Sp Move file dir2/file.txt to ../file.txt .Sp .Vb 2 \& dave> cd dir2 \& dave> move file.txt .. .Ve .Sp Move file.txt to dav2/new_file.txt .Sp .Vb 1 \& dave> move file.txt dav2/new_file.txt .Ve .Sp Aliases: mv .IP "\fBopen \s-1URL\s0\fR" 4 .IX Item "open URL" connects to the WebDAV-enabled server at \s-1URL\s0 .Sp .Vb 1 \& dave> open host.org/dav_dir/ .Ve .Sp Note that if authorization details are required you will be prompted for them. .Sp https and Digest authorization are not currently supported. Please let me know if you need it. .IP "\fBoptions [\s-1URL\s0]\fR" 4 .IX Item "options [URL]" show the \s-1HTTP\s0 methods allowed for a \s-1URL\s0 .Sp .Vb 3 \& dave> options index.html \& OPTIONS, GET, HEAD, POST, DELETE, TRACE, PROPFIND, \& PROPPATCH, COPY, MOVE, LOCK, UNLOCK .Ve .Sp Note that Microsoft's \s-1IIS\s0 does not support \s-1LOCK\s0 on collections (directories). Nor does it support \s-1PROPPATCH.\s0 .IP "\fBpropfind [\s-1URL\s0]\fR" 4 .IX Item "propfind [URL]" show the properties of a resource .Sp .Vb 8 \& dave> propfind test \& URL: http://host.org/dav_dir/test/ \& 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: .Ve .Sp Using ls will get you the same printout if you ls a file. But ls'ing a collection will show you the collections contents. .IP "\fBput \s-1FILE\s0 [\s-1URL\s0]\fR" 4 .IX Item "put FILE [URL]" uploads a local file or directory to \s-1URL\s0 or the currently opened location. .Sp If \s-1URL\s0 is an existing collection then the dir/file will be copied \s-1INTO\s0 that collection. .Sp .Vb 1 \& dave> open host.org/dav_dir/ .Ve .Sp Recursively put local my_dir/ to host.org/dav_dir/my_dir/: .Sp .Vb 1 \& dave> put my_dir/ .Ve .Sp Put local index.html to host.org/dav_dir/index1.html: .Sp .Vb 1 \& dave> put /tmp/index.html index1.html .Ve .Sp Put * to remote directory .Sp .Vb 1 \& dave> put * .Ve .Sp Put index[12].htm? to remote directory /dav_dir (/dav_dir must exist) .Sp .Vb 1 \& dave> put index[12].htm? /dav_dir .Ve .Sp Put index[1234].htm? to remote directory /dav_dir (/dav_dir must exist) .Sp .Vb 1 \& dave> put index[1\-4].htm? /dav_dir .Ve .Sp Glob types supported are, * (matches any characters), ? (matches any one character), [...] (matches any characters in the set ...). .IP "\fBpwd\fR" 4 .IX Item "pwd" prints the currently opened \s-1URL\s0 (working directory) .Sp .Vb 4 \& dave> open host.org/dav_dir/ \& dave> cd new_dir/ \& dave> pwd \& http://host.org/dav_dir/new_dir/ .Ve .IP "\fBq\fR" 4 .IX Item "q" .PD 0 .IP "\fBbye\fR" 4 .IX Item "bye" .IP "\fBquit\fR" 4 .IX Item "quit" .PD exits dave .Sp Note that dave does not unlock any locks created during your session. .Sp Aliases: q, quit .IP "\fBset \s-1URL PROPERTY VALUE\s0 [\s-1NAMESPACE\s0]\fR" 4 .IX Item "set URL PROPERTY VALUE [NAMESPACE]" sets a custom property on a resource .Sp .Vb 2 \& dave> set file.txt author "Patrick Collins" \& dave> set file.txt author "Patrick Collins" "mynamespace" .Ve .Sp The \s-1NAMESPACE\s0 by default is \*(L"\s-1DAV:\*(R".\s0 .IP "\fB!\fR" 4 .IX Item "!" .PD 0 .IP "\fBsh\fR" 4 .IX Item "sh" .PD executes a local command (alias !) .Sp .Vb 3 \& dave> sh cat localfile \& dave> !gzip localfile.gz \& dave> ! "cat localfile | less" .Ve .Sp Aliases: ! .IP "\fBshowlocks\fR" 4 .IX Item "showlocks" show my locks on a resource .Sp Shows any locked resources that you've locked in this session. .Sp See \f(CW\*(C`propfind\*(C'\fR if you'd like to see anyone's locks held against a particular resource. .IP "\fBsteal [\s-1URL\s0]\fR" 4 .IX Item "steal [URL]" remove \s-1ANY\s0 locks on a resource .Sp 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. .IP "\fBunlock [\s-1URL\s0]\fR" 4 .IX Item "unlock [URL]" unlocks a resource .Sp Note that unlock will only unlock locks that you have created. Use steal if you want to forcefully unlock somebody else's lock. .IP "\fBunset \s-1URL PROPERTY\s0 [\s-1NAMESPACE\s0]\fR" 4 .IX Item "unset URL PROPERTY [NAMESPACE]" unsets a property from a resource .Sp .Vb 2 \& dave> unset file.txt author \& dave> unset file.txt author "mynamespace" .Ve .Sp The \s-1NAMESPACE\s0 by default is \*(L"\s-1DAV:\*(R".\s0 .SH "GETTING HELP" .IX Header "GETTING HELP" The perldav mailing list There is a mailing list for PerlDAV and dave for use by Developers and Users. Please see http://mailman.webdav.org/mailman/listinfo/perldav .SH "INSTALLATION" .IX Header "INSTALLATION" dave is installed to /usr/local/bin by default when you install the PerlDAV library. See http://www.webdav.org/perldav/ for installation details of PerlDAV. .SH "WHAT PLATFORMS WILL IT WORK ON?" .IX Header "WHAT PLATFORMS WILL IT WORK ON?" dave is pure perl so only needs Perl5.003 (or later) and the \f(CW\*(C`PerlDAV\*(C'\fR library to be installed. .PP I have not ported dave to Windows but would like somebody to have a shot at it. .SH "SEE ALSO" .IX Header "SEE ALSO" The \f(CW\*(C`PerlDAV\*(C'\fR perl \s-1API\s0 at http://www.webdav.org/perldav/ or by typing \*(L"perldoc \s-1HTTP::DAV\*(R"\s0 on your command line. .SH "AUTHOR AND COPYRIGHT" .IX Header "AUTHOR AND COPYRIGHT" This module is Copyright (C) 2001 by .PP .Vb 3 \& Patrick Collins \& G03 Gloucester Place, Kensington \& Sydney, Australia \& \& Email: pcollins@cpan.org \& Phone: +61 2 9663 4916 .Ve .PP All rights reserved. .PP You may distribute this module under the terms of either the \s-1GNU\s0 General Public License or the Artistic License, as specified in the Perl \s-1README\s0 file. .SH "MAINTAINER" .IX Header "MAINTAINER" Cosimo Streppone,