DOC: Add manpage for nfs-ls
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Sat, 22 Mar 2014 01:15:40 +0000 (18:15 -0700)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Sat, 22 Mar 2014 01:15:40 +0000 (18:15 -0700)
Makefile.am
configure.ac
doc/Makefile.am [new file with mode: 0644]
doc/nfs-ls.1.xml [new file with mode: 0644]

index 4ffb68f9897a84e5b3503e4daf30b1b28505e07a..fdd4c98a094513ed8fa2f157483a34c8422c6fd5 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = mount nfs nlm nsm portmap rquota lib include . $(MAYBE_EXAMPLES)
+SUBDIRS = doc mount nfs nlm nsm portmap rquota lib include . $(MAYBE_EXAMPLES)
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libnfs.pc
index c52a370c6ddef05837245506d84aaa3c2634bd8b..43ffc6cf3154d7e05cdec344014dbd3b9929850e 100644 (file)
@@ -155,6 +155,7 @@ AC_CHECK_MEMBER([struct sockaddr_storage.ss_family],
 
 #output
 AC_CONFIG_FILES([Makefile]
+                [doc/Makefile]
                 [include/Makefile]
                 [lib/Makefile]
                 [mount/Makefile]
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..2e9625c
--- /dev/null
@@ -0,0 +1,8 @@
+XSLTPROC = /usr/bin/xsltproc
+
+# Manpages
+man1_MANS = nfs-ls.1
+CLEANFILES = $(man1_MANS)
+
+nfs-ls.1: nfs-ls.1.xml
+       -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
diff --git a/doc/nfs-ls.1.xml b/doc/nfs-ls.1.xml
new file mode 100644 (file)
index 0000000..9329369
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<refentry id="nfs-ls.1">
+
+<refmeta>
+       <refentrytitle>nfs-ls</refentrytitle>
+       <manvolnum>1</manvolnum>
+       <refmiscinfo class="source">nfs-ls</refmiscinfo>
+       <refmiscinfo class="manual">nfs-ls: list servers, exports and directories</refmiscinfo>
+</refmeta>
+
+
+<refnamediv>
+       <refname>nfs-ls</refname>
+        <refpurpose>Utility to list NFS servers, exports and directories</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+       <cmdsynopsis>
+               <command>nfs-ls [ OPTIONS ] &lt;NFS-URL&gt;</command>
+       </cmdsynopsis>
+       
+       <cmdsynopsis>
+               <command>nfs-ls</command>
+               <arg choice="opt">-R --recursive</arg>
+               <arg choice="opt">-s --summary</arg>
+               <arg choice="opt">-D --discovery</arg>
+               <arg choice="opt">-? --help</arg>
+               <arg choice="opt">--usage</arg>
+       </cmdsynopsis>
+       
+</refsynopsisdiv>
+
+  <refsect1><title>DESCRIPTION</title>
+    <para>
+      nfs-ls is a utility to list NFS servers, exports or directories.
+    </para>
+    <para>
+      Example: List the content of a directory on the NFS server
+      <screen format="linespecific">
+$ nfs-ls nfs://127.0.0.1/data/tmp
+-rwxrwxr-x  1  1000  1000      1190802 a.out
+-rwxr-xr-x  1  1000  1000           13 foo123.copy
+-rwxrwxrwx  1  1000  1000            8 foo123.writtenx
+      </screen>
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+
+      <varlistentry><term>-s --summary</term>
+        <listitem>
+          <para>
+           Print a summary line at the end of output.
+         </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>-R --recursive</term>
+        <listitem>
+          <para>
+           Recursive listing of the specified URL.
+         </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>-D --discovery;</term>
+        <listitem>
+          <para>
+           This option is used to discover local NFS servers and to list
+           the exports for specific servers.
+          </para>
+          <para>
+           When used with the 'nfs://' URL the command will try to
+           detect all local NFS servers and will list their IPs.
+          </para>
+          <para>
+           When used with a 'nfs://server' the command will
+           list all the exports on the specified server.
+          </para>
+          <para>
+           Example: Discover and list all local NFS servers
+           <screen format="linespecific">
+$ nfs-ls -D nfs://
+nfs://10.10.10.10
+nfs://10.0.0.10
+           </screen>
+
+           Example: List the exports for a server
+           <screen format="linespecific">
+$ nfs-ls -D nfs://10.10.10.10
+nfs://10.10.10.10/foo
+nfs://10.10.10.10/bar
+           </screen>
+         </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>-? --help</term>
+        <listitem>
+          <para>
+           Display basic help text.
+         </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--usage</term>
+        <listitem>
+          <para>
+           Display basic usage text.
+         </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1><title>SEE ALSO</title>
+    <para>
+      <ulink url="http://github.com/sahlberg/libnfs"/>
+    </para>
+  </refsect1>
+
+</refentry>