Home Get specific container using lxc/lxd-list command
Reply: 1

Get specific container using lxc/lxd-list command

AMPROGAMMER Published in 2017-12-07 13:15:27Z

When I run the following command:

I get the following output:

But I only want to get the container specified in the command not all of them.

How can I do that?

Lawrence Cherone
Lawrence Cherone Reply to 2017-12-07 14:27:00Z

You can use POSIX Extended Regular Expressions:

lxc list -c n '^ubuntu$'

|  NAME  |
| ubuntu |

If you don't want the formatting just use the --format csv switch, which will output just ubuntu

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.343872 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO