When I run the following command:
But I only want to get the container specified in the command not all of them.
How can I do that?
When I run the following command:
But I only want to get the container specified in the command not all of them.
How can I do that?
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