]>
Commit | Line | Data |
---|---|---|
d823d5b9 | 1 | |
f79d43bb | 2 | <!-- |
d823d5b9 | 3 | |
4 | lxc: linux Container library | |
5 | ||
6 | (C) Copyright IBM Corp. 2007, 2008 | |
7 | ||
8 | Authors: | |
9afe19d6 | 9 | Daniel Lezcano <daniel.lezcano at free.fr> |
d823d5b9 | 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 | |
250b1eec | 23 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
d823d5b9 | 24 | |
25 | --> | |
26 | ||
7f951458 | 27 | <!DOCTYPE refentry PUBLIC @docdtd@ [ |
99e4008c | 28 | |
37cf83ea | 29 | <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml"> |
99e4008c MN |
30 | <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml"> |
31 | ]> | |
d823d5b9 | 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> | |
b4578c5b | 52 | <command>lxc-ls</command> |
4e7186c5 | 53 | <arg choice="opt">-1</arg> |
b4578c5b | 54 | <arg choice="opt">--active</arg> |
4e7186c5 SG |
55 | <arg choice="opt">--frozen</arg> |
56 | <arg choice="opt">--running</arg> | |
57 | <arg choice="opt">--stopped</arg> | |
c2e1b07a | 58 | <arg choice="opt">--defined</arg> |
c5afb6e4 SG |
59 | <arg choice="opt">-f</arg> |
60 | <arg choice="opt">-F <replaceable>format</replaceable></arg> | |
0f027869 | 61 | <arg choice="opt">-g <replaceable>groups</replaceable></arg> |
37cf83ea CB |
62 | <arg choice="opt">--nesting=<replaceable>NUM</replaceable></arg> |
63 | <arg choice="opt">--filter=<replaceable>regex</replaceable></arg> | |
d823d5b9 | 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> | |
4e7186c5 SG |
78 | <varlistentry> |
79 | <term> | |
1bc07a5b | 80 | <option>-1</option> |
4e7186c5 SG |
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> | |
d823d5b9 | 88 | |
7ef01413 | 89 | <varlistentry> |
4e7186c5 | 90 | <term> |
1bc07a5b | 91 | <option>--active</option> |
4e7186c5 SG |
92 | </term> |
93 | <listitem> | |
94 | <para> | |
95 | List only active containers (same as --frozen --running). | |
96 | </para> | |
97 | </listitem> | |
7ef01413 DW |
98 | </varlistentry> |
99 | ||
d823d5b9 | 100 | <varlistentry> |
4e7186c5 | 101 | <term> |
1bc07a5b | 102 | <option>--frozen</option> |
4e7186c5 SG |
103 | </term> |
104 | <listitem> | |
105 | <para> | |
106 | List only frozen containers. | |
107 | </para> | |
108 | </listitem> | |
d823d5b9 | 109 | </varlistentry> |
110 | ||
4e7186c5 SG |
111 | <varlistentry> |
112 | <term> | |
1bc07a5b | 113 | <option>--running</option> |
4e7186c5 SG |
114 | </term> |
115 | <listitem> | |
116 | <para> | |
117 | List only running containers. | |
118 | </para> | |
119 | </listitem> | |
120 | </varlistentry> | |
d823d5b9 | 121 | |
4e7186c5 SG |
122 | <varlistentry> |
123 | <term> | |
1bc07a5b | 124 | <option>--stopped</option> |
4e7186c5 SG |
125 | </term> |
126 | <listitem> | |
127 | <para> | |
128 | List only stopped containers. | |
129 | </para> | |
130 | </listitem> | |
131 | </varlistentry> | |
d823d5b9 | 132 | |
c2e1b07a GG |
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 | ||
d823d5b9 | 144 | <varlistentry> |
4e7186c5 | 145 | <term> |
37cf83ea | 146 | <option>-f,--fancy</option> |
4e7186c5 SG |
147 | </term> |
148 | <listitem> | |
149 | <para> | |
150 | Use a fancy, column-based output. | |
151 | </para> | |
152 | </listitem> | |
d823d5b9 | 153 | </varlistentry> |
154 | ||
155 | <varlistentry> | |
4e7186c5 | 156 | <term> |
37cf83ea | 157 | <option>-F,--fancy-format <replaceable>format</replaceable></option> |
4e7186c5 SG |
158 | </term> |
159 | <listitem> | |
160 | <para> | |
8b662579 | 161 | Comma separated list of columns to show in the fancy output. |
860490af | 162 | The list of accepted and default fields is listed in --help. |
4e7186c5 SG |
163 | </para> |
164 | </listitem> | |
d823d5b9 | 165 | </varlistentry> |
166 | ||
0f027869 SG |
167 | <varlistentry> |
168 | <term> | |
37cf83ea | 169 | <option>-g,--groups <replaceable>groups</replaceable></option> |
0f027869 SG |
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 | ||
0e21ea4b SG |
179 | <varlistentry> |
180 | <term> | |
37cf83ea | 181 | <option>--nesting=<replaceable>NUM</replaceable></option> |
0e21ea4b SG |
182 | </term> |
183 | <listitem> | |
184 | <para> | |
37cf83ea CB |
185 | Show nested containers. The number of nesting levels to be shown can |
186 | be specified by passing a number as argument. | |
0e21ea4b SG |
187 | </para> |
188 | </listitem> | |
189 | </varlistentry> | |
190 | ||
4e7186c5 SG |
191 | <varlistentry> |
192 | <term> | |
37cf83ea | 193 | <option>--filter=<replaceable>regex</replaceable></option> |
4e7186c5 SG |
194 | </term> |
195 | <listitem> | |
196 | <para> | |
37cf83ea CB |
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>. | |
2cf7c05a KY |
201 | </para> |
202 | </listitem> | |
203 | </varlistentry> | |
d823d5b9 | 204 | </variablelist> |
205 | </refsect1> | |
206 | ||
6f639311 | 207 | <refsect1> |
4e7186c5 SG |
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> | |
d823d5b9 | 219 | |
4e7186c5 SG |
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> | |
99e4008c | 230 | |
37cf83ea CB |
231 | &commonoptions; |
232 | ||
4019712d SG |
233 | &seealso; |
234 | ||
37cf83ea CB |
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 | ||
d823d5b9 | 242 | <refsect1> |
243 | <title>Author</title> | |
37cf83ea CB |
244 | <para>Christian Brauner <email>christian.brauner@mailbox.org</email>, |
245 | Stéphane Graber <email>stgraber@ubuntu.com</email></para> | |
d823d5b9 | 246 | </refsect1> |
37cf83ea | 247 | |
d823d5b9 | 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 | --> |