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  Prints basic help and options.
54
55       -man
56           Prints the full manual (equivalent to perldoc dave).
57
58           You will need to use a pager like "more" or "less".
59
60            e.g. dave -man |less
61
62       -p <password>
63           Sets the password to be used for the URL.
64
65           You must also supply a user. See -u.
66
67       -u <username>
68           Sets the username to be used for the URL.
69
70           You must also supply a pass. See -p.
71

COMMANDS

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

GETTING HELP

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

INSTALLATION

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

WHAT PLATFORMS WILL IT WORK ON?

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

SEE ALSO

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