1DAVE(1)               User Contributed Perl Documentation              DAVE(1)
2
3
4

NAME

6       dave - DAV Explorer
7

SYNOPSIS

9           dave [OPTIONS] URL
10
11       E.g.
12
13          $ dave -u pcollins -p mypass www.host.org/dav_dir/
14          ...
15          dave> get file.txt
16
17       Use "dave -h" to get help on options.
18
19       Use "perldoc dave" for the whole manpage.
20

DESCRIPTION

22       dave is a powerful command-line program for interacting with WebDAV-
23       enabled webservers. With dave you can:
24
25       •   get and put files
26
27       •   make directories on a remote webserver
28
29       •   remove files and directories from a remote webserver
30
31       •   edit a file on the webserver with a single command
32
33       •   recursively get a remote directory
34
35       •   recursively put a local directory
36
37       •   lock and unlock remote files and directories
38
39       •   securely transfer over https
40
41       •   authenticate using the safer Digest authentication
42
43       Dave is a part of the PerlDAV project (http://www.webdav.org/perldav/)
44       and is built on top of the HTTP::DAV perl API.
45
46       If you would like to script webdav interactions in Perl checkout the
47       HTTP::DAV API as it's commands are the basis for dave's.
48

OPTIONS

50       "-debug N"
51           Sets the debug level to N. 0=none. 3=noisy.
52
53       "-h"
54           Prints basic help and options.
55
56       "-man"
57           Prints the full manual (equivalent to perldoc dave).
58
59           You will need to use a pager like "more" or "less". e.g.
60
61               dave -man |less
62
63       "-p <password>"
64           Sets the password to be used for the URL.  You must also supply a
65           user. See "-u".
66
67       "-u <username>"
68           Sets the username to be used for the URL.  You must also supply a
69           pass. See "-p".
70
71       "-tmpdir /some/path"
72           Create temporary files in "/some/path" instead of the default
73           "/tmp".
74

COMMANDS

76       cd URL
77           changes directories
78
79              dave> open host.org/dav_dir/
80              dave> cd dir1
81              dave> cd ../dir2
82
83       cat URL
84           shows the contents of a remote file
85
86              dave> open host.org/dav_dir/
87              dave> cat index.html
88
89           Note: you cannot cat a directory (collection).
90
91       cp
92       copy SOURCE_URL DEST_URL
93           copies one remote resource to another
94
95             dave> open host.org/dav_dir/
96
97           Create a copy of dir1/ as dav2/
98
99             dave> cp dir1 dav2
100
101           Create a copy of dir1/file.txt as dav2/file.txt
102
103             dave> cd dir1
104             dave> copy file.txt ../dav2
105
106           Create a copy of file.txt as ../dav2/new_file.txt
107
108             dave> copy file.txt dav2/new_file.txt
109
110           Aliases: cp
111
112       rmdir URL
113       rm URL
114       delete URL
115           deletes a remote resource
116
117              dave> open host.org/dav_dir/
118              dave> delete index.html
119              dave> rmdir ./dir1
120              dave> delete /dav_dir/dir2/
121              dave> delete /dav_dir/*.html
122
123           This command recursively deletes directories. BE CAREFUL :)
124
125           This command supported wildcards (globbing). See get.
126
127           Aliases: rm, rmdir
128
129       edit URL
130           edits the contents of a remote file
131
132              dave> open host.org/dav_dir/
133              dave> edit index.html
134
135           Edit is equivalent to the following sequence of commands:
136
137              LOCK index.html (if allowed)
138              GET index.html /tmp/dave.perldav.421341234124
139              sh $EDITOR /tmp/dave.perldav.421341234124
140              PUT index.html (if modified)
141              UNLOCK index.html (if locked)
142
143           Where $EDITOR is determined from the environment variables
144           DAV_EDITOR or EDITOR.
145
146           If DAV_EDITOR is set, it will use that, otherwise it will use
147           EDITOR. If neither variables are set, then "vi" will be used.
148
149           Notes:
150
151           The lock only lasts for 10 hours.
152
153           You cannot edit a directory (collection).
154
155           The temporary save directory is editable by editing dave and
156           changing TMP_DIR
157
158       get URL [FILE]
159           downloads the file or directory at URL
160
161           If FILE is not specified it will be saved to your current working
162           directory using the same name as the remote name.
163
164             dave> open host.org/dav_dir/
165
166           Recursively get remote my_dir/ to .
167
168             dave> get my_dir/
169
170           Recursively get remote my_dir/ to /tmp/my_dir/
171
172             dave> get my_dir /tmp
173
174           Get remote my_dir/index.html to /tmp/index.html
175
176             dave> get /dav_dir/my_dir/index.html /tmp
177
178           Get remote index.html to /tmp/index1.html
179
180             dave> get index.html /tmp/index1.html
181
182           Use globs and save to /tmp
183
184             dave> get index* /tmp                   # Gets index*.html, index*.txt, etc.
185             dave> get index*.html /tmp/index1.html  # Gets index*.html
186             dave> get index[12].htm?                # Gets file1 and file2, .htm and .html
187
188       ? [CMD]
189       h [CMD]
190       help [CMD]
191           prints list of commands or help for CMD
192
193             dave> ?
194
195             dave> help get
196
197           Aliases: ?, h
198
199       lcd [DIR]
200           changes local directory
201
202             dave> lcd /tmp
203
204       lls [DIR]
205           lists local directory contents
206
207             dave> lcd /tmp
208             dave> lls
209             dave> lls /home
210
211           This command simply execs the local ls command and is equivalent to
212           "!ls"
213
214       dir [URL]
215       ls [URL]
216           lists remote directory contents or file props
217
218             dave> ls
219             Listing of http://host.org/dav_dir/
220                             ./          Aug 29 02:26  <dir>
221                mtx_0.04.tar.gz   52640  Aug 11 11:45
222                     index.html    4580  Aug 11 11:45
223                 index0.04.html    4936  Nov 11  2000
224                         mydir/          Aug 19 21:14  <dir>,<locked>
225
226             dave> ls index.html
227             URL: http://www.webdav.org/perldav/index.html
228             Content-type: text/html
229             Creation date: Sun Aug 12 21:58:02 2001
230             Last modified:
231             Size: 4580 bytes
232             Locks supported: write/exclusive write/shared
233             Locks:
234
235           Use propfind to get a similar printout of a collection (directory).
236
237           Aliases: dir
238
239       lock [URL [TIMEOUT] [DEPTH]]
240           locks a resource
241
242           Without a URL you will lock the current remote collection.
243
244           TIMEOUT can be any of the following formats:
245                        30s          30 seconds from now
246                        10m          ten minutes from now
247                        1h           one hour from now
248                        1d           tomorrow
249                        3M           in three months
250                        10y          in ten years time
251                        2000-02-31 00:40:33
252                        2000-02-31
253
254           Default is an infinite timeout
255
256           See perldoc "HTTP::DAV::Resource" for more information about
257           timeouts.
258
259           DEPTH can be either "0" or "infinity" (default)
260
261           Seeting the lock Scope and Type is not currently implemented. Let
262           me know if you need it as it shouldn't be too much effort.
263
264       mkdir URL
265       mkcol URL
266           make a remote collection (directory)
267
268             dave> open host.org/dav_dir/
269             dave> mkcol new_dir
270             dave> mkdir /dav_dir/new_dir
271
272           Aliases: mkdir
273
274       mv
275       move SOURCE_URL DEST_URL
276           moves a remote resource to another
277
278             dave> open host.org/dav_dir/
279
280           Move dir1/ to dav2/
281
282             dave> move dir1 dav2
283
284           Move file dir2/file.txt to ../file.txt
285
286             dave> cd dir2
287             dave> move file.txt ..
288
289           Move file.txt to dav2/new_file.txt
290
291             dave> move file.txt dav2/new_file.txt
292
293           Aliases: mv
294
295       open URL
296           connects to the WebDAV-enabled server at URL
297
298              dave> open host.org/dav_dir/
299
300           Note that if authorization details are required you will be
301           prompted for them.
302
303           https and Digest authorization are not currently supported. Please
304           let me know if you need it.
305
306       options [URL]
307           show the HTTP methods allowed for a URL
308
309              dave> options index.html
310              OPTIONS, GET, HEAD, POST, DELETE, TRACE, PROPFIND,
311              PROPPATCH, COPY, MOVE, LOCK, UNLOCK
312
313           Note that Microsoft's IIS does not support LOCK on collections
314           (directories). Nor does it support PROPPATCH.
315
316       propfind [URL]
317           show the properties of a resource
318
319             dave> propfind test
320             URL: http://host.org/dav_dir/test/
321             Content-type: httpd/unix-directory
322             Creation date: Wed Aug 29 00:36:42 2001
323             Last modified:
324             Size:  bytes
325             Locks supported: write/exclusive write/shared
326             Locks:
327
328           Using ls will get you the same printout if you ls a file. But
329           ls'ing a collection will show you the collections contents.
330
331       put FILE [URL]
332           uploads a local file or directory to URL or the currently opened
333           location.
334
335           If URL is an existing collection then the dir/file will be copied
336           INTO that collection.
337
338             dave> open host.org/dav_dir/
339
340           Recursively put local my_dir/ to host.org/dav_dir/my_dir/:
341
342             dave> put my_dir/
343
344           Put local index.html to host.org/dav_dir/index1.html:
345
346             dave> put /tmp/index.html index1.html
347
348           Put * to remote directory
349
350             dave> put *
351
352           Put index[12].htm? to remote directory /dav_dir (/dav_dir must
353           exist)
354
355             dave> put index[12].htm? /dav_dir
356
357           Put index[1234].htm? to remote directory /dav_dir (/dav_dir must
358           exist)
359
360             dave> put index[1-4].htm? /dav_dir
361
362           Glob types supported are, * (matches any characters), ? (matches
363           any one character), [...] (matches any characters in the set ...).
364
365       pwd prints the currently opened URL (working directory)
366
367            dave> open host.org/dav_dir/
368            dave> cd new_dir/
369            dave> pwd
370            http://host.org/dav_dir/new_dir/
371
372       q
373       bye
374       quit
375           exits dave
376
377           Note that dave does not unlock any locks created during your
378           session.
379
380           Aliases: q, quit
381
382       set URL PROPERTY VALUE [NAMESPACE]
383           sets a custom property on a resource
384
385              dave> set file.txt author "Patrick Collins"
386              dave> set file.txt author "Patrick Collins" "mynamespace"
387
388           The NAMESPACE by default is "DAV:".
389
390       !
391       sh  executes a local command (alias !)
392
393              dave> sh cat localfile
394              dave> !gzip localfile.gz
395              dave> ! "cat localfile | less"
396
397           Aliases: !
398
399       showlocks
400           show my locks on a resource
401
402           Shows any locked resources that you've locked in this session.
403
404           See "propfind" if you'd like to see anyone's locks held against a
405           particular resource.
406
407       steal [URL]
408           remove ANY locks on a resource
409
410           Useful if you accidentally forgot to unlock a resource from a
411           previous session or if you think that somebody has forgotten to
412           unlock a resource.
413
414       unlock [URL]
415           unlocks a resource
416
417           Note that unlock will only unlock locks that you have created. Use
418           steal if you want to forcefully unlock somebody else's lock.
419
420       unset URL PROPERTY [NAMESPACE]
421           unsets a property from a resource
422
423              dave> unset file.txt author
424              dave> unset file.txt author "mynamespace"
425
426           The NAMESPACE by default is "DAV:".
427

GETTING HELP

429       The perldav mailing list There is a mailing list for PerlDAV and dave
430       for use by Developers and Users.  Please see
431       http://mailman.webdav.org/mailman/listinfo/perldav
432

INSTALLATION

434       dave is installed to /usr/local/bin by default when you install the
435       PerlDAV library. See http://www.webdav.org/perldav/ for installation
436       details of PerlDAV.
437

WHAT PLATFORMS WILL IT WORK ON?

439       dave is pure perl so only needs Perl5.003 (or later) and the "PerlDAV"
440       library to be installed.
441
442       I have not ported dave to Windows but would like somebody to have a
443       shot at it.
444

SEE ALSO

446       The "PerlDAV" perl API at http://www.webdav.org/perldav/ or by typing
447       "perldoc HTTP::DAV" on your command line.
448
450       This module is Copyright (C) 2001 by
451
452           Patrick Collins
453           G03 Gloucester Place, Kensington
454           Sydney, Australia
455
456           Email: pcollins@cpan.org
457           Phone: +61 2 9663 4916
458
459       All rights reserved.
460
461       You may distribute this module under the terms of either the GNU
462       General Public License or the Artistic License, as specified in the
463       Perl README file.
464

MAINTAINER

466       Cosimo Streppone, <cosimo@cpan.org>
467
468
469
470perl v5.36.0                      2023-01-20                           DAVE(1)
Impressum