4 lxc: linux Container library
6 (C) Copyright IBM Corp. 2007, 2008
9 Daniel Lezcano <daniel.lezcano at free.fr>
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Lesser General Public
13 License as published by the Free Software Foundation; either
14 version 2.1 of the License, or (at your option) any later version.
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public
22 License along with this library; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 <!DOCTYPE refentry PUBLIC @docdtd@ [
29 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
30 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
35 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
38 <refentrytitle>lxc-ls</refentrytitle>
39 <manvolnum>1</manvolnum>
43 <refname>lxc-ls</refname>
46 list the containers existing on the system
52 <command>lxc-ls</command>
53 <arg choice="opt">-1</arg>
54 <arg choice="opt">--active</arg>
55 <arg choice="opt">--frozen</arg>
56 <arg choice="opt">--running</arg>
57 <arg choice="opt">--stopped</arg>
58 <arg choice="opt">-f</arg>
59 <arg choice="opt">-F <replaceable>format</replaceable></arg>
60 <arg choice="opt">-g <replaceable>groups</replaceable></arg>
61 <arg choice="opt">--nesting=<replaceable>NUM</replaceable></arg>
62 <arg choice="opt">--filter=<replaceable>regex</replaceable></arg>
67 <title>Description</title>
69 <command>lxc-ls</command> list the containers existing on the
75 <title>Options</title>
83 Show one entry per line. (default when /dev/stdout isn't a tty)
90 <option>--active</option>
94 List only active containers (same as --frozen --running).
101 <option>--frozen</option>
105 List only frozen containers.
112 <option>--running</option>
116 List only running containers.
123 <option>--stopped</option>
127 List only stopped containers.
134 <option>-f,--fancy</option>
138 Use a fancy, column-based output.
145 <option>-F,--fancy-format <replaceable>format</replaceable></option>
149 Comma separated list of column to show in the fancy output.
150 The list of accepted and default fields is listed in --help.
157 <option>-g,--groups <replaceable>groups</replaceable></option>
161 Comma separated list of groups the container must have to be displayed.
162 The parameter may be passed multiple times.
169 <option>--nesting=<replaceable>NUM</replaceable></option>
173 Show nested containers. The number of nesting levels to be shown can
174 be specified by passing a number as argument.
181 <option>--filter=<replaceable>regex</replaceable></option>
185 The regular expression passed to <command>lxc-ls</command> will be
186 applied to the container name. The format is a POSIX extended
187 regular expression. It can also be given as additional argument
188 without explicitly using <option>--filter</option>.
196 <title>Examples</title>
199 <term>lxc-ls --fancy</term>
202 list all the containers, listing one per line along with its
203 name, state, ipv4 and ipv6 addresses.
209 <term>lxc-ls --active -1</term>
212 list active containers and display the list in one column.
224 <title>History</title>
225 Written originally as a shell script by Daniel Lezcano and Serge Hallyn.
226 Later reimplemented and extended in Python by Stéphane Graber and then
227 reimplemented and extended in C by Christian Brauner.
231 <title>Author</title>
232 <para>Christian Brauner <email>christian.brauner@mailbox.org</email>,
233 Stéphane Graber <email>stgraber@ubuntu.com</email></para>
238 <!-- Keep this comment at the end of the file
243 sgml-minimize-attributes:nil
244 sgml-always-quote-attributes:t
247 sgml-parent-document:nil
248 sgml-default-dtd-file:nil
249 sgml-exposed-tags:nil
250 sgml-local-catalogs:nil
251 sgml-local-ecat-files:nil