Debian Codegraph @

doc/html/dave.html

raw
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>dave - DAV Explorer</title>
6 <link rel="stylesheet" href="http://www.webdav.org/perldav/perldav_plain.css" type="text/css" />
7 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
8 <link rev="made" href="mailto:root@localhost" />
9 </head>
10
11 <body>
12
13
14
15 <h1 id="NAME">NAME</h1>
16
17 <p>dave - DAV Explorer</p>
18
19 <h1 id="SYNOPSIS">SYNOPSIS</h1>
20
21 <pre><code>dave [OPTIONS] URL</code></pre>
22
23 <p>e.g.</p>
24
25 <pre><code>$ dave -u pcollins -p mypass www.host.org/dav_dir/
26 ...
27 dave&gt; get file.txt</code></pre>
28
29 <p>Use <code>dave -h</code> to get help on options.</p>
30
31 <p>Use <code>perldoc dave</code> for the whole manpage.</p>
32
33 <h1 id="DESCRIPTION">DESCRIPTION</h1>
34
35 <p>dave is a powerful command-line program for interacting with WebDAV-enabled webservers. With dave you can:</p>
36
37 <ul>
38
39 <li><p>get and put files</p>
40
41 </li>
42 <li><p>make directories on a remote webserver</p>
43
44 </li>
45 <li><p>remove files and directories from a remote webserver</p>
46
47 </li>
48 <li><p>edit a file on the webserver with a single command</p>
49
50 </li>
51 <li><p>recursively get a remote directory</p>
52
53 </li>
54 <li><p>recursively put a local directory</p>
55
56 </li>
57 <li><p>lock and unlock remote files and directories</p>
58
59 </li>
60 <li><p>securely transfer over https</p>
61
62 </li>
63 <li><p>authenticate using the safer Digest authentication</p>
64
65 </li>
66 </ul>
67
68 <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>
69
70 <p>If you would like to script webdav interactions in Perl checkout the HTTP::DAV API as it&#39;s commands are the basis for dave&#39;s.</p>
71
72 <h1 id="OPTIONS">OPTIONS</h1>
73
74 <dl>
75
76 <dt id="debug-N"><code>-debug N</code></dt>
77 <dd>
78
79 <p>Sets the debug level to N. 0=none. 3=noisy.</p>
80
81 </dd>
82 <dt id="h"><code>-h</code></dt>
83 <dd>
84
85 <p>Prints basic help and options.</p>
86
87 </dd>
88 <dt id="man"><code>-man</code></dt>
89 <dd>
90
91 <p>Prints the full manual (equivalent to perldoc dave).</p>
92
93 <p>You will need to use a pager like <code>more</code> or <code>less</code>. e.g.</p>
94
95 <pre><code>dave -man |less</code></pre>
96
97 </dd>
98 <dt id="p-password"><code>-p &lt;password&gt;</code></dt>
99 <dd>
100
101 <p>Sets the password to be used for the URL. You must also supply a user. See <code>-u</code>.</p>
102
103 </dd>
104 <dt id="u-username"><code>-u &lt;username&gt;</code></dt>
105 <dd>
106
107 <p>Sets the username to be used for the URL. You must also supply a pass. See <code>-p</code>.</p>
108
109 </dd>
110 <dt id="tmpdir-some-path"><code>-tmpdir /some/path</code></dt>
111 <dd>
112
113 <p>Create temporary files in <code>/some/path</code> instead of the default <code>/tmp</code>.</p>
114
115 </dd>
116 </dl>
117
118 <h1 id="COMMANDS">COMMANDS</h1>
119
120 <dl>
121
122 <dt id="cd-URL"><b>cd URL</b></dt>
123 <dd>
124
125 <p>changes directories</p>
126
127 <pre><code>dave&gt; open host.org/dav_dir/
128 dave&gt; cd dir1
129 dave&gt; cd ../dir2</code></pre>
130
131 </dd>
132 <dt id="cat-URL"><b>cat URL</b></dt>
133 <dd>
134
135 <p>shows the contents of a remote file</p>
136
137 <pre><code>dave&gt; open host.org/dav_dir/
138 dave&gt; cat index.html</code></pre>
139
140 <p>Note: you cannot cat a directory (collection).</p>
141
142 </dd>
143 <dt id="cp"><b>cp</b></dt>
144 <dd>
145
146 </dd>
147 <dt id="copy-SOURCE_URL-DEST_URL"><b>copy SOURCE_URL DEST_URL</b></dt>
148 <dd>
149
150 <p>copies one remote resource to another</p>
151
152 <pre><code>dave&gt; open host.org/dav_dir/</code></pre>
153
154 <p>Create a copy of dir1/ as dav2/</p>
155
156 <pre><code>dave&gt; cp dir1 dav2</code></pre>
157
158 <p>Create a copy of dir1/file.txt as dav2/file.txt</p>
159
160 <pre><code>dave&gt; cd dir1
161 dave&gt; copy file.txt ../dav2</code></pre>
162
163 <p>Create a copy of file.txt as ../dav2/new_file.txt</p>
164
165 <pre><code>dave&gt; copy file.txt dav2/new_file.txt</code></pre>
166
167 <p>Aliases: cp</p>
168
169 </dd>
170 <dt id="rmdir-URL"><b>rmdir URL</b></dt>
171 <dd>
172
173 </dd>
174 <dt id="rm-URL"><b>rm URL</b></dt>
175 <dd>
176
177 </dd>
178 <dt id="delete-URL"><b>delete URL</b></dt>
179 <dd>
180
181 <p>deletes a remote resource</p>
182
183 <pre><code>dave&gt; open host.org/dav_dir/
184 dave&gt; delete index.html
185 dave&gt; rmdir ./dir1
186 dave&gt; delete /dav_dir/dir2/
187 dave&gt; delete /dav_dir/*.html</code></pre>
188
189 <p>This command recursively deletes directories. BE CAREFUL :)</p>
190
191 <p>This command supported wildcards (globbing). See get.</p>
192
193 <p>Aliases: rm, rmdir</p>
194
195 </dd>
196 <dt id="edit-URL"><b>edit URL</b></dt>
197 <dd>
198
199 <p>edits the contents of a remote file</p>
200
201 <pre><code>dave&gt; open host.org/dav_dir/
202 dave&gt; edit index.html</code></pre>
203
204 <p>Edit is equivalent to the following sequence of commands:</p>
205
206 <pre><code>LOCK index.html (if allowed)
207 GET index.html /tmp/dave.perldav.421341234124
208 sh $EDITOR /tmp/dave.perldav.421341234124
209 PUT index.html (if modified)
210 UNLOCK index.html (if locked)</code></pre>
211
212 <p>Where $EDITOR is determined from the environment variables DAV_EDITOR or EDITOR.</p>
213
214 <p>If DAV_EDITOR is set, it will use that, otherwise it will use EDITOR. If neither variables are set, then &quot;vi&quot; will be used.</p>
215
216 <p>Notes:</p>
217
218 <p>The lock only lasts for 10 hours.</p>
219
220 <p>You cannot edit a directory (collection).</p>
221
222 <p>The temporary save directory is editable by editing dave and changing TMP_DIR</p>
223
224 </dd>
225 <dt id="get-URL-FILE"><b>get URL [FILE]</b></dt>
226 <dd>
227
228 <p>downloads the file or directory at URL</p>
229
230 <p>If FILE is not specified it will be saved to your current working directory using the same name as the remote name.</p>
231
232 <pre><code>dave&gt; open host.org/dav_dir/</code></pre>
233
234 <p>Recursively get remote my_dir/ to .</p>
235
236 <pre><code>dave&gt; get my_dir/ </code></pre>
237
238 <p>Recursively get remote my_dir/ to /tmp/my_dir/</p>
239
240 <pre><code>dave&gt; get my_dir /tmp</code></pre>
241
242 <p>Get remote my_dir/index.html to /tmp/index.html</p>
243
244 <pre><code>dave&gt; get /dav_dir/my_dir/index.html /tmp</code></pre>
245
246 <p>Get remote index.html to /tmp/index1.html</p>
247
248 <pre><code>dave&gt; get index.html /tmp/index1.html</code></pre>
249
250 <p>Use globs and save to /tmp</p>
251
252 <pre><code>dave&gt; get index* /tmp # Gets index*.html, index*.txt, etc.
253 dave&gt; get index*.html /tmp/index1.html # Gets index*.html
254 dave&gt; get index[12].htm? # Gets file1 and file2, .htm and .html</code></pre>
255
256 </dd>
257 <dt id="CMD"><b>? [CMD]</b></dt>
258 <dd>
259
260 </dd>
261 <dt id="h-CMD"><b>h [CMD]</b></dt>
262 <dd>
263
264 </dd>
265 <dt id="help-CMD"><b>help [CMD]</b></dt>
266 <dd>
267
268 <p>prints list of commands or help for CMD</p>
269
270 <pre><code>dave&gt; ?
271
272 dave&gt; help get</code></pre>
273
274 <p>Aliases: ?, h</p>
275
276 </dd>
277 <dt id="lcd-DIR"><b>lcd [DIR]</b></dt>
278 <dd>
279
280 <p>changes local directory</p>
281
282 <pre><code>dave&gt; lcd /tmp</code></pre>
283
284 </dd>
285 <dt id="lls-DIR"><b>lls [DIR]</b></dt>
286 <dd>
287
288 <p>lists local directory contents</p>
289
290 <pre><code>dave&gt; lcd /tmp
291 dave&gt; lls
292 dave&gt; lls /home</code></pre>
293
294 <p>This command simply execs the local ls command and is equivalent to &quot;!ls&quot;</p>
295
296 </dd>
297 <dt id="lpwd"><b>lpwd</b></dt>
298 <dd>
299
300 <p>prints the current working directory, locally</p>
301
302 <p>This command simply execs the local ls command and is equivalent to &quot;!pwd&quot;</p>
303
304 </dd>
305 <dt id="dir-URL"><b>dir [URL]</b></dt>
306 <dd>
307
308 </dd>
309 <dt id="ls-URL"><b>ls [URL]</b></dt>
310 <dd>
311
312 <p>lists remote directory contents or file props</p>
313
314 <pre><code>dave&gt; ls
315 Listing of http://host.org/dav_dir/
316 ./ Aug 29 02:26 &lt;dir&gt;
317 mtx_0.04.tar.gz 52640 Aug 11 11:45
318 index.html 4580 Aug 11 11:45
319 index0.04.html 4936 Nov 11 2000
320 mydir/ Aug 19 21:14 &lt;dir&gt;,&lt;locked&gt;
321
322 dave&gt; ls index.html
323 URL: http://www.webdav.org/perldav/index.html
324 Content-type: text/html
325 Creation date: Sun Aug 12 21:58:02 2001
326 Last modified:
327 Size: 4580 bytes
328 Locks supported: write/exclusive write/shared
329 Locks:</code></pre>
330
331 <p>Use propfind to get a similar printout of a collection (directory).</p>
332
333 <p>Aliases: dir</p>
334
335 </dd>
336 <dt id="lock-URL-TIMEOUT-DEPTH"><b>lock [URL [TIMEOUT] [DEPTH]]</b></dt>
337 <dd>
338
339 <p>locks a resource</p>
340
341 <p>Without a URL you will lock the current remote collection.</p>
342
343 <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>
344
345 <p>Default is an infinite timeout</p>
346
347 <p>See perldoc <code>HTTP::DAV::Resource</code> for more information about timeouts.</p>
348
349 <p>DEPTH can be either &quot;0&quot; or &quot;infinity&quot; (default)</p>
350
351 <p>Seeting the lock Scope and Type is not currently implemented. Let me know if you need it as it shouldn&#39;t be too much effort.</p>
352
353 </dd>
354 <dt id="mkdir-URL"><b>mkdir URL</b></dt>
355 <dd>
356
357 </dd>
358 <dt id="mkcol-URL"><b>mkcol URL</b></dt>
359 <dd>
360
361 <p>make a remote collection (directory)</p>
362
363 <pre><code>dave&gt; open host.org/dav_dir/
364 dave&gt; mkcol new_dir
365 dave&gt; mkdir /dav_dir/new_dir</code></pre>
366
367 <p>Aliases: mkdir</p>
368
369 </dd>
370 <dt id="mv"><b>mv</b></dt>
371 <dd>
372
373 </dd>
374 <dt id="move-SOURCE_URL-DEST_URL"><b>move SOURCE_URL DEST_URL</b></dt>
375 <dd>
376
377 <p>moves a remote resource to another</p>
378
379 <pre><code>dave&gt; open host.org/dav_dir/</code></pre>
380
381 <p>Move dir1/ to dav2/</p>
382
383 <pre><code>dave&gt; move dir1 dav2</code></pre>
384
385 <p>Move file dir2/file.txt to ../file.txt</p>
386
387 <pre><code>dave&gt; cd dir2
388 dave&gt; move file.txt ..</code></pre>
389
390 <p>Move file.txt to dav2/new_file.txt</p>
391
392 <pre><code>dave&gt; move file.txt dav2/new_file.txt</code></pre>
393
394 <p>Aliases: mv</p>
395
396 </dd>
397 <dt id="open-URL"><b>open URL</b></dt>
398 <dd>
399
400 <p>connects to the WebDAV-enabled server at URL</p>
401
402 <pre><code>dave&gt; open host.org/dav_dir/</code></pre>
403
404 <p>Note that if authorization details are required you will be prompted for them.</p>
405
406 <p>https and Digest authorization are not currently supported. Please let me know if you need it.</p>
407
408 </dd>
409 <dt id="options-URL"><b>options [URL]</b></dt>
410 <dd>
411
412 <p>show the HTTP methods allowed for a URL</p>
413
414 <pre><code>dave&gt; options index.html
415 OPTIONS, GET, HEAD, POST, DELETE, TRACE, PROPFIND,
416 PROPPATCH, COPY, MOVE, LOCK, UNLOCK</code></pre>
417
418 <p>Note that Microsoft&#39;s IIS does not support LOCK on collections (directories). Nor does it support PROPPATCH.</p>
419
420 </dd>
421 <dt id="propfind-URL"><b>propfind [URL]</b></dt>
422 <dd>
423
424 <p>show the properties of a resource</p>
425
426 <pre><code>dave&gt; propfind test
427 URL: http://host.org/dav_dir/test/
428 Content-type: httpd/unix-directory
429 Creation date: Wed Aug 29 00:36:42 2001
430 Last modified:
431 Size: bytes
432 Locks supported: write/exclusive write/shared
433 Locks:</code></pre>
434
435 <p>Using ls will get you the same printout if you ls a file. But ls&#39;ing a collection will show you the collections contents.</p>
436
437 </dd>
438 <dt id="put-FILE-URL"><b>put FILE [URL]</b></dt>
439 <dd>
440
441 <p>uploads a local file or directory to URL or the currently opened location.</p>
442
443 <p>If URL is an existing collection then the dir/file will be copied INTO that collection.</p>
444
445 <pre><code>dave&gt; open host.org/dav_dir/</code></pre>
446
447 <p>Recursively put local my_dir/ to host.org/dav_dir/my_dir/:</p>
448
449 <pre><code>dave&gt; put my_dir/ </code></pre>
450
451 <p>Put local index.html to host.org/dav_dir/index1.html:</p>
452
453 <pre><code>dave&gt; put /tmp/index.html index1.html</code></pre>
454
455 <p>Put * to remote directory</p>
456
457 <pre><code>dave&gt; put *</code></pre>
458
459 <p>Put index[12].htm? to remote directory /dav_dir (/dav_dir must exist)</p>
460
461 <pre><code>dave&gt; put index[12].htm? /dav_dir</code></pre>
462
463 <p>Put index[1234].htm? to remote directory /dav_dir (/dav_dir must exist)</p>
464
465 <pre><code>dave&gt; put index[1-4].htm? /dav_dir</code></pre>
466
467 <p>Glob types supported are, * (matches any characters), ? (matches any one character), [...] (matches any characters in the set ...).</p>
468
469 </dd>
470 <dt id="pwd"><b>pwd</b></dt>
471 <dd>
472
473 <p>prints the currently opened URL (working directory)</p>
474
475 <pre><code>dave&gt; open host.org/dav_dir/
476 dave&gt; cd new_dir/
477 dave&gt; pwd
478 http://host.org/dav_dir/new_dir/</code></pre>
479
480 </dd>
481 <dt id="q"><b>q</b></dt>
482 <dd>
483
484 </dd>
485 <dt id="bye"><b>bye</b></dt>
486 <dd>
487
488 </dd>
489 <dt id="quit"><b>quit</b></dt>
490 <dd>
491
492 <p>exits dave</p>
493
494 <p>Note that dave does not unlock any locks created during your session.</p>
495
496 <p>Aliases: q, quit</p>
497
498 </dd>
499 <dt id="set-URL-PROPERTY-VALUE-NAMESPACE"><b>set URL PROPERTY VALUE [NAMESPACE]</b></dt>
500 <dd>
501
502 <p>sets a custom property on a resource</p>
503
504 <pre><code>dave&gt; set file.txt author &quot;Patrick Collins&quot;
505 dave&gt; set file.txt author &quot;Patrick Collins&quot; &quot;mynamespace&quot;</code></pre>
506
507 <p>The NAMESPACE by default is &quot;DAV:&quot;.</p>
508
509 </dd>
510 <dt id="pod"><b>!</b></dt>
511 <dd>
512
513 </dd>
514 <dt id="sh"><b>sh</b></dt>
515 <dd>
516
517 <p>executes a local command (alias !)</p>
518
519 <pre><code>dave&gt; sh cat localfile
520 dave&gt; !gzip localfile.gz
521 dave&gt; ! &quot;cat localfile | less&quot;</code></pre>
522
523 <p>Aliases: !</p>
524
525 </dd>
526 <dt id="showlocks"><b>showlocks</b></dt>
527 <dd>
528
529 <p>show my locks on a resource</p>
530
531 <p>Shows any locked resources that you&#39;ve locked in this session.</p>
532
533 <p>See <code>propfind</code> if you&#39;d like to see anyone&#39;s locks held against a particular resource.</p>
534
535 </dd>
536 <dt id="steal-URL"><b>steal [URL]</b></dt>
537 <dd>
538
539 <p>remove ANY locks on a resource</p>
540
541 <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>
542
543 </dd>
544 <dt id="unlock-URL"><b>unlock [URL]</b></dt>
545 <dd>
546
547 <p>unlocks a resource</p>
548
549 <p>Note that unlock will only unlock locks that you have created. Use steal if you want to forcefully unlock somebody else&#39;s lock.</p>
550
551 </dd>
552 <dt id="unset-URL-PROPERTY-NAMESPACE"><b>unset URL PROPERTY [NAMESPACE]</b></dt>
553 <dd>
554
555 <p>unsets a property from a resource</p>
556
557 <pre><code>dave&gt; unset file.txt author
558 dave&gt; unset file.txt author &quot;mynamespace&quot;</code></pre>
559
560 <p>The NAMESPACE by default is &quot;DAV:&quot;.</p>
561
562 </dd>
563 </dl>
564
565 <h1 id="GETTING-HELP">GETTING HELP</h1>
566
567 <p>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</p>
568
569 <h1 id="INSTALLATION">INSTALLATION</h1>
570
571 <p>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.</p>
572
573 <h1 id="WHAT-PLATFORMS-WILL-IT-WORK-ON">WHAT PLATFORMS WILL IT WORK ON?</h1>
574
575 <p>dave is pure perl so only needs Perl5.003 (or later) and the <code>PerlDAV</code> library to be installed.</p>
576
577 <p>I have not ported dave to Windows but would like somebody to have a shot at it.</p>
578
579 <h1 id="SEE-ALSO">SEE ALSO</h1>
580
581 <p>The <code>PerlDAV</code> perl API at http://www.webdav.org/perldav/ or by typing &quot;perldoc HTTP::DAV&quot; on your command line.</p>
582
583 <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>
584
585 <p>This module is Copyright (C) 2001 by</p>
586
587 <pre><code>Patrick Collins
588 G03 Gloucester Place, Kensington
589 Sydney, Australia
590
591 Email: [email protected]
592 Phone: +61 2 9663 4916</code></pre>
593
594 <p>All rights reserved.</p>
595
596 <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>
597
598 <h1 id="MAINTAINER">MAINTAINER</h1>
599
600 <p>Cosimo Streppone, &lt;[email protected]&gt;</p>
601
602
603 </body>
604
605 </html>
606
607