]> git.proxmox.com Git - mirror_lxc.git/blobdiff - doc/lxc-ls.sgml.in
meson: Simplify if statements
[mirror_lxc.git] / doc / lxc-ls.sgml.in
index f5f65732cf37242ded056530a19c00d4fbb7d4b8..7f55f4f9e20e768adcae6baa9ea41dff2b373cb5 100644 (file)
@@ -1,12 +1,12 @@
 
-<!-- 
+<!--
 
 lxc: linux Container library
 
 (C) Copyright IBM Corp. 2007, 2008
 
 Authors:
-Daniel Lezcano <dlezcano at fr.ibm.com>
+Daniel Lezcano <daniel.lezcano at free.fr>
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -20,12 +20,13 @@ Lesser General Public License for more details.
 
 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 -->
 
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC @docdtd@ [
 
+<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
 ]>
 
@@ -49,8 +50,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   <refsynopsisdiv>
     <cmdsynopsis>
       <command>lxc-ls</command>
+      <arg choice="opt">-1</arg>
       <arg choice="opt">--active</arg>
-      <arg choice="opt">ls option</arg>
+      <arg choice="opt">--frozen</arg>
+      <arg choice="opt">--running</arg>
+      <arg choice="opt">--stopped</arg>
+      <arg choice="opt">--defined</arg>
+      <arg choice="opt">-f</arg>
+      <arg choice="opt">-F <replaceable>format</replaceable></arg>
+      <arg choice="opt">-g <replaceable>groups</replaceable></arg>
+      <arg choice="opt">--nesting=<replaceable>NUM</replaceable></arg>
+      <arg choice="opt">--filter=<replaceable>regex</replaceable></arg>
     </cmdsynopsis>
   </refsynopsisdiv>
 
@@ -65,75 +75,174 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   <refsect1>
     <title>Options</title>
     <variablelist>
+      <varlistentry>
+        <term>
+          <option>-1</option>
+        </term>
+        <listitem>
+          <para>
+            Show one entry per line. (default when /dev/stdout isn't a tty)
+          </para>
+        </listitem>
+      </varlistentry>
 
       <varlistentry>
-       <term>
-         <option><optional>--active</optional></option>
-       </term>
-       <listitem>
-         <para>
-           List active containers.
-         </para>
-       </listitem>
+        <term>
+          <option>--active</option>
+        </term>
+        <listitem>
+          <para>
+            List only active containers (same as --frozen --running).
+          </para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
-       <term>
-         <option><optional>ls options</optional></option>
-       </term>
-       <listitem>
-         <para>
-           The option passed to <command>lxc-ls</command> are the
-           same as the <command>ls</command> command.
-         </para>
-       </listitem>
+        <term>
+          <option>--frozen</option>
+        </term>
+        <listitem>
+          <para>
+            List only frozen containers.
+          </para>
+        </listitem>
       </varlistentry>
 
-    </variablelist>
+      <varlistentry>
+        <term>
+          <option>--running</option>
+        </term>
+        <listitem>
+          <para>
+            List only running containers.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--stopped</option>
+        </term>
+        <listitem>
+          <para>
+            List only stopped containers.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--defined</option>
+        </term>
+        <listitem>
+          <para>
+            List only defined containers.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>-f,--fancy</option>
+        </term>
+        <listitem>
+          <para>
+            Use a fancy, column-based output.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>-F,--fancy-format <replaceable>format</replaceable></option>
+        </term>
+        <listitem>
+          <para>
+            Comma separated list of columns to show in the fancy output.
+            The list of accepted and default fields is listed in --help.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>-g,--groups <replaceable>groups</replaceable></option>
+        </term>
+        <listitem>
+          <para>
+            Comma separated list of groups the container must have to be displayed.
+            The parameter may be passed multiple times.
+          </para>
+        </listitem>
+      </varlistentry>
 
+      <varlistentry>
+        <term>
+          <option>--nesting=<replaceable>NUM</replaceable></option>
+        </term>
+        <listitem>
+          <para>
+            Show nested containers. The number of nesting levels to be shown can
+            be specified by passing a number as argument.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--filter=<replaceable>regex</replaceable></option>
+        </term>
+        <listitem>
+          <para>
+            The regular expression passed to <command>lxc-ls</command> will be
+            applied to the container name. The format is a POSIX extended
+            regular expression. It can also be given as additional argument
+            without explicitly using <option>--filter</option>.
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
   </refsect1>
 
   <refsect1>
     <title>Examples</title>
     <variablelist>
       <varlistentry>
-       <term>lxc-ls -l</term>
-       <listitem>
-       <para>
-         list all the container and their permissions.
-       </para>
-       </listitem>
+        <term>lxc-ls --fancy</term>
+        <listitem>
+        <para>
+          list all the containers, listing one per line along with its
+          name, state, ipv4 and ipv6 addresses.
+        </para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
-       <term>lxc-ls --active -1</term>
-       <listitem>
-       <para>
-         list active containers and display the list in one column.
-       </para>
-       </listitem>
+        <term>lxc-ls --active -1</term>
+        <listitem>
+        <para>
+          list active containers and display the list in one column.
+        </para>
+        </listitem>
       </varlistentry>
-
     </variablelist>
   </refsect1>
 
-  <refsect1>
-    <title>See Also</title>
+  &commonoptions;
 
-    <simpara>    
-      <citerefentry>
-       <refentrytitle>ls</refentrytitle>
-       <manvolnum>1</manvolnum>
-      </citerefentry>,
-    </simpara>
+  &seealso;
 
+  <refsect1>
+    <title>History</title>
+    Written originally as a shell script by Daniel Lezcano and Serge Hallyn.
+    Later reimplemented and extended in Python by Stéphane Graber and then
+    reimplemented and extended in C by Christian Brauner.
   </refsect1>
 
-  &seealso;
-
   <refsect1>
     <title>Author</title>
-    <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
+    <para>Christian Brauner <email>christian.brauner@mailbox.org</email>,
+    Stéphane Graber <email>stgraber@ubuntu.com</email></para>
   </refsect1>
 
 </refentry>