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">--defined</arg>
59 <arg choice="opt">-f</arg>
60 <arg choice="opt">-F <replaceable>format</replaceable></arg>
61 <arg choice="opt">-g <replaceable>groups</replaceable></arg>
62 <arg choice="opt">--nesting=<replaceable>NUM</replaceable></arg>
63 <arg choice="opt">--filter=<replaceable>regex</replaceable></arg>
68 <title>Description</title>
70 <command>lxc-ls</command> list the containers existing on the
76 <title>Options</title>
84 Show one entry per line. (default when /dev/stdout isn't a tty)
91 <option>--active</option>
95 List only active containers (same as --frozen --running).
102 <option>--frozen</option>
106 List only frozen containers.
113 <option>--running</option>
117 List only running containers.
124 <option>--stopped</option>
128 List only stopped containers.
135 <option>--defined</option>
139 List only defined containers.
146 <option>-f,--fancy</option>
150 Use a fancy, column-based output.
157 <option>-F,--fancy-format <replaceable>format</replaceable></option>
161 Comma separated list of columns to show in the fancy output.
162 The list of accepted and default fields is listed in --help.
169 <option>-g,--groups <replaceable>groups</replaceable></option>
173 Comma separated list of groups the container must have to be displayed.
174 The parameter may be passed multiple times.
181 <option>--nesting=<replaceable>NUM</replaceable></option>
185 Show nested containers. The number of nesting levels to be shown can
186 be specified by passing a number as argument.
193 <option>--filter=<replaceable>regex</replaceable></option>
197 The regular expression passed to <command>lxc-ls</command> will be
198 applied to the container name. The format is a POSIX extended
199 regular expression. It can also be given as additional argument
200 without explicitly using <option>--filter</option>.
208 <title>Examples</title>
211 <term>lxc-ls --fancy</term>
214 list all the containers, listing one per line along with its
215 name, state, ipv4 and ipv6 addresses.
221 <term>lxc-ls --active -1</term>
224 list active containers and display the list in one column.
236 <title>History</title>
237 Written originally as a shell script by Daniel Lezcano and Serge Hallyn.
238 Later reimplemented and extended in Python by Stéphane Graber and then
239 reimplemented and extended in C by Christian Brauner.
243 <title>Author</title>
244 <para>Christian Brauner <email>christian.brauner@mailbox.org</email>,
245 Stéphane Graber <email>stgraber@ubuntu.com</email></para>
250 <!-- Keep this comment at the end of the file
255 sgml-minimize-attributes:nil
256 sgml-always-quote-attributes:t
259 sgml-parent-document:nil
260 sgml-default-dtd-file:nil
261 sgml-exposed-tags:nil
262 sgml-local-catalogs:nil
263 sgml-local-ecat-files:nil