UNIXworkcode

1 --- 2 title: 'Getting started' 3 --- 4 5 ### Test 6 7 After successful installation you can test dav with your WebDAV server. 8 9 dav list http://example.com/webdav/ 10 11 This lists all child resources of the specified collection. If you are unfamiliar to WebDAV terminology this means basically listing all files in a directory, similar to the ls unix tool. Actually you can also write `dav ls` instead of `dav list` and there is also an `-l` option similarly to the unix tool `ls`. 12 13 ### Create a repository 14 15 All dav commands are expecting an url argument, but it may be a bit cumbersome to type a full url every time. But you can configure a repository in the dav configuration file ($HOME/.dav/config.xml) with the servers url, optional authentication information and other options. Afterwards you can access a webdav server just with the repository name and an optional path. 16 17 So when you have created a repository with the name myserv and the url http://example.com/webdav/, you can just type 18 19 dav list myserv 20 21 You can add a path to the repository name to access an other url 22 23 dav list myserv/mycollection/ 24 25 This lists the content of http://example.com/webdav/mycollection/ 26 27 The easiest way to create a repository is with the add-repository command. This is a simple configuration assistant. 28 29 $ dav add-repository 30 Each repository must have an unique name. 31 name: myserv 32 33 Specify the repository base url. 34 url: http://example.com/webdav/ 35 36 User for HTTP authentication. 37 user (optional): myuser 38 password (optional): 39 40 41 Added repository: myserv (http://example.com/webdav/) 42 43 You can also configure the config.xml yourself, check out [the config.xml spec][1]. 44 45 [1]: ./configuration.html 46 47