]>
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> | |
c5afb6e4 SG |
58 | <arg choice="opt">-f</arg> |
59 | <arg choice="opt">-F <replaceable>format</replaceable></arg> | |
0f027869 | 60 | <arg choice="opt">-g <replaceable>groups</replaceable></arg> |
37cf83ea CB |
61 | <arg choice="opt">--nesting=<replaceable>NUM</replaceable></arg> |
62 | <arg choice="opt">--filter=<replaceable>regex</replaceable></arg> | |
d823d5b9 | 63 | </cmdsynopsis> |
64 | </refsynopsisdiv> | |
65 | ||
66 | <refsect1> | |
67 | <title>Description</title> | |
68 | <para> | |
69 | <command>lxc-ls</command> list the containers existing on the | |
70 | system. | |
71 | </para> | |
72 | </refsect1> | |
73 | ||
74 | <refsect1> | |
75 | <title>Options</title> | |
76 | <variablelist> | |
4e7186c5 SG |
77 | <varlistentry> |
78 | <term> | |
1bc07a5b | 79 | <option>-1</option> |
4e7186c5 SG |
80 | </term> |
81 | <listitem> | |
82 | <para> | |
83 | Show one entry per line. (default when /dev/stdout isn't a tty) | |
84 | </para> | |
85 | </listitem> | |
86 | </varlistentry> | |
d823d5b9 | 87 | |
7ef01413 | 88 | <varlistentry> |
4e7186c5 | 89 | <term> |
1bc07a5b | 90 | <option>--active</option> |
4e7186c5 SG |
91 | </term> |
92 | <listitem> | |
93 | <para> | |
94 | List only active containers (same as --frozen --running). | |
95 | </para> | |
96 | </listitem> | |
7ef01413 DW |
97 | </varlistentry> |
98 | ||
d823d5b9 | 99 | <varlistentry> |
4e7186c5 | 100 | <term> |
1bc07a5b | 101 | <option>--frozen</option> |
4e7186c5 SG |
102 | </term> |
103 | <listitem> | |
104 | <para> | |
105 | List only frozen containers. | |
106 | </para> | |
107 | </listitem> | |
d823d5b9 | 108 | </varlistentry> |
109 | ||
4e7186c5 SG |
110 | <varlistentry> |
111 | <term> | |
1bc07a5b | 112 | <option>--running</option> |
4e7186c5 SG |
113 | </term> |
114 | <listitem> | |
115 | <para> | |
116 | List only running containers. | |
117 | </para> | |
118 | </listitem> | |
119 | </varlistentry> | |
d823d5b9 | 120 | |
4e7186c5 SG |
121 | <varlistentry> |
122 | <term> | |
1bc07a5b | 123 | <option>--stopped</option> |
4e7186c5 SG |
124 | </term> |
125 | <listitem> | |
126 | <para> | |
127 | List only stopped containers. | |
128 | </para> | |
129 | </listitem> | |
130 | </varlistentry> | |
d823d5b9 | 131 | |
d823d5b9 | 132 | <varlistentry> |
4e7186c5 | 133 | <term> |
37cf83ea | 134 | <option>-f,--fancy</option> |
4e7186c5 SG |
135 | </term> |
136 | <listitem> | |
137 | <para> | |
138 | Use a fancy, column-based output. | |
139 | </para> | |
140 | </listitem> | |
d823d5b9 | 141 | </varlistentry> |
142 | ||
143 | <varlistentry> | |
4e7186c5 | 144 | <term> |
37cf83ea | 145 | <option>-F,--fancy-format <replaceable>format</replaceable></option> |
4e7186c5 SG |
146 | </term> |
147 | <listitem> | |
148 | <para> | |
8b662579 | 149 | Comma separated list of columns to show in the fancy output. |
860490af | 150 | The list of accepted and default fields is listed in --help. |
4e7186c5 SG |
151 | </para> |
152 | </listitem> | |
d823d5b9 | 153 | </varlistentry> |
154 | ||
0f027869 SG |
155 | <varlistentry> |
156 | <term> | |
37cf83ea | 157 | <option>-g,--groups <replaceable>groups</replaceable></option> |
0f027869 SG |
158 | </term> |
159 | <listitem> | |
160 | <para> | |
161 | Comma separated list of groups the container must have to be displayed. | |
162 | The parameter may be passed multiple times. | |
163 | </para> | |
164 | </listitem> | |
165 | </varlistentry> | |
166 | ||
0e21ea4b SG |
167 | <varlistentry> |
168 | <term> | |
37cf83ea | 169 | <option>--nesting=<replaceable>NUM</replaceable></option> |
0e21ea4b SG |
170 | </term> |
171 | <listitem> | |
172 | <para> | |
37cf83ea CB |
173 | Show nested containers. The number of nesting levels to be shown can |
174 | be specified by passing a number as argument. | |
0e21ea4b SG |
175 | </para> |
176 | </listitem> | |
177 | </varlistentry> | |
178 | ||
4e7186c5 SG |
179 | <varlistentry> |
180 | <term> | |
37cf83ea | 181 | <option>--filter=<replaceable>regex</replaceable></option> |
4e7186c5 SG |
182 | </term> |
183 | <listitem> | |
184 | <para> | |
37cf83ea CB |
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>. | |
2cf7c05a KY |
189 | </para> |
190 | </listitem> | |
191 | </varlistentry> | |
d823d5b9 | 192 | </variablelist> |
193 | </refsect1> | |
194 | ||
6f639311 | 195 | <refsect1> |
4e7186c5 SG |
196 | <title>Examples</title> |
197 | <variablelist> | |
198 | <varlistentry> | |
199 | <term>lxc-ls --fancy</term> | |
200 | <listitem> | |
201 | <para> | |
202 | list all the containers, listing one per line along with its | |
203 | name, state, ipv4 and ipv6 addresses. | |
204 | </para> | |
205 | </listitem> | |
206 | </varlistentry> | |
d823d5b9 | 207 | |
4e7186c5 SG |
208 | <varlistentry> |
209 | <term>lxc-ls --active -1</term> | |
210 | <listitem> | |
211 | <para> | |
212 | list active containers and display the list in one column. | |
213 | </para> | |
214 | </listitem> | |
215 | </varlistentry> | |
216 | </variablelist> | |
217 | </refsect1> | |
99e4008c | 218 | |
37cf83ea CB |
219 | &commonoptions; |
220 | ||
4019712d SG |
221 | &seealso; |
222 | ||
37cf83ea CB |
223 | <refsect1> |
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. | |
228 | </refsect1> | |
229 | ||
d823d5b9 | 230 | <refsect1> |
231 | <title>Author</title> | |
37cf83ea CB |
232 | <para>Christian Brauner <email>christian.brauner@mailbox.org</email>, |
233 | Stéphane Graber <email>stgraber@ubuntu.com</email></para> | |
d823d5b9 | 234 | </refsect1> |
37cf83ea | 235 | |
d823d5b9 | 236 | </refentry> |
237 | ||
238 | <!-- Keep this comment at the end of the file | |
239 | Local variables: | |
240 | mode: sgml | |
241 | sgml-omittag:t | |
242 | sgml-shorttag:t | |
243 | sgml-minimize-attributes:nil | |
244 | sgml-always-quote-attributes:t | |
245 | sgml-indent-step:2 | |
246 | sgml-indent-data: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 | |
252 | End: | |
253 | --> |