Accessing DAV from the Command Line


./cadaver dav:!> open http://example.com


There are a number of command-line clients available to access DAV-enabled resources, allowing both for interactivity and easy integration within administrative scripts. They can be convenient replacements for their FTP and scp counterparts. Two of the most popular open source command-line clients are cadaver and sitecopy. cadaver is an interactive shell that provides FTP-style commands such as ls, put, get, and so on. The example shows how to use cadaver to access a DAV-enabled web server, list the available resources, and edit a remote file.

./cadaver dav:!> open http://example.com dav:/> ls Listing collection `/': succeeded. Coll:   images                                  0 Dec  7  2004 Coll:   styles                                  0 Dec 12  2004         Home.html                            4816 Aug 14 14:19         company.html                         5352 Dec  7  2004         partners.html                        6087 Dec  7  2004         solutions.html                       3037 Dec  7  2004 dav:/> edit solutions.html Locking `solutions.html': succeeded. Downloading `/solutions.html' to /tmp/cadaver-edit- zEzdL9.html Progress: [=============================>] 100.0% of 6230 bytes succeeded. Running editor: `vi /tmp/cadaver-edit- zEzdL9.html'... Changes were made. Uploading changes to `/solutions.html' Progress: [=============================>] 100.0% of 6232 bytes succeeded. Unlocking `solutions.html': succeeded. dav:/>


cadaver can be downloaded from http://www.webdav.org/cadaver. sitecopy allows you to maintain a local document tree and a remote server synchronized using a variety of protocols, including DAV. It can be downloaded from http://www.lyra.org/sitecopy.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net