]> git.proxmox.com Git - mirror_lxc.git/blob - doc/lxc-ls.sgml.in
Merge pull request #2532 from tcharding/unshare-err
[mirror_lxc.git] / doc / lxc-ls.sgml.in
1
2 <!--
3
4 lxc: linux Container library
5
6 (C) Copyright IBM Corp. 2007, 2008
7
8 Authors:
9 Daniel Lezcano <daniel.lezcano at free.fr>
10
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.
15
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.
20
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
24
25 -->
26
27 <!DOCTYPE refentry PUBLIC @docdtd@ [
28
29 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
30 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
31 ]>
32
33 <refentry>
34
35 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
36
37 <refmeta>
38 <refentrytitle>lxc-ls</refentrytitle>
39 <manvolnum>1</manvolnum>
40 </refmeta>
41
42 <refnamediv>
43 <refname>lxc-ls</refname>
44
45 <refpurpose>
46 list the containers existing on the system
47 </refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <cmdsynopsis>
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>
64 </cmdsynopsis>
65 </refsynopsisdiv>
66
67 <refsect1>
68 <title>Description</title>
69 <para>
70 <command>lxc-ls</command> list the containers existing on the
71 system.
72 </para>
73 </refsect1>
74
75 <refsect1>
76 <title>Options</title>
77 <variablelist>
78 <varlistentry>
79 <term>
80 <option>-1</option>
81 </term>
82 <listitem>
83 <para>
84 Show one entry per line. (default when /dev/stdout isn't a tty)
85 </para>
86 </listitem>
87 </varlistentry>
88
89 <varlistentry>
90 <term>
91 <option>--active</option>
92 </term>
93 <listitem>
94 <para>
95 List only active containers (same as --frozen --running).
96 </para>
97 </listitem>
98 </varlistentry>
99
100 <varlistentry>
101 <term>
102 <option>--frozen</option>
103 </term>
104 <listitem>
105 <para>
106 List only frozen containers.
107 </para>
108 </listitem>
109 </varlistentry>
110
111 <varlistentry>
112 <term>
113 <option>--running</option>
114 </term>
115 <listitem>
116 <para>
117 List only running containers.
118 </para>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term>
124 <option>--stopped</option>
125 </term>
126 <listitem>
127 <para>
128 List only stopped containers.
129 </para>
130 </listitem>
131 </varlistentry>
132
133 <varlistentry>
134 <term>
135 <option>--defined</option>
136 </term>
137 <listitem>
138 <para>
139 List only defined containers.
140 </para>
141 </listitem>
142 </varlistentry>
143
144 <varlistentry>
145 <term>
146 <option>-f,--fancy</option>
147 </term>
148 <listitem>
149 <para>
150 Use a fancy, column-based output.
151 </para>
152 </listitem>
153 </varlistentry>
154
155 <varlistentry>
156 <term>
157 <option>-F,--fancy-format <replaceable>format</replaceable></option>
158 </term>
159 <listitem>
160 <para>
161 Comma separated list of columns to show in the fancy output.
162 The list of accepted and default fields is listed in --help.
163 </para>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry>
168 <term>
169 <option>-g,--groups <replaceable>groups</replaceable></option>
170 </term>
171 <listitem>
172 <para>
173 Comma separated list of groups the container must have to be displayed.
174 The parameter may be passed multiple times.
175 </para>
176 </listitem>
177 </varlistentry>
178
179 <varlistentry>
180 <term>
181 <option>--nesting=<replaceable>NUM</replaceable></option>
182 </term>
183 <listitem>
184 <para>
185 Show nested containers. The number of nesting levels to be shown can
186 be specified by passing a number as argument.
187 </para>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry>
192 <term>
193 <option>--filter=<replaceable>regex</replaceable></option>
194 </term>
195 <listitem>
196 <para>
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>.
201 </para>
202 </listitem>
203 </varlistentry>
204 </variablelist>
205 </refsect1>
206
207 <refsect1>
208 <title>Examples</title>
209 <variablelist>
210 <varlistentry>
211 <term>lxc-ls --fancy</term>
212 <listitem>
213 <para>
214 list all the containers, listing one per line along with its
215 name, state, ipv4 and ipv6 addresses.
216 </para>
217 </listitem>
218 </varlistentry>
219
220 <varlistentry>
221 <term>lxc-ls --active -1</term>
222 <listitem>
223 <para>
224 list active containers and display the list in one column.
225 </para>
226 </listitem>
227 </varlistentry>
228 </variablelist>
229 </refsect1>
230
231 &commonoptions;
232
233 &seealso;
234
235 <refsect1>
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.
240 </refsect1>
241
242 <refsect1>
243 <title>Author</title>
244 <para>Christian Brauner <email>christian.brauner@mailbox.org</email>,
245 Stéphane Graber <email>stgraber@ubuntu.com</email></para>
246 </refsect1>
247
248 </refentry>
249
250 <!-- Keep this comment at the end of the file
251 Local variables:
252 mode: sgml
253 sgml-omittag:t
254 sgml-shorttag:t
255 sgml-minimize-attributes:nil
256 sgml-always-quote-attributes:t
257 sgml-indent-step:2
258 sgml-indent-data: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
264 End:
265 -->