lxc exec $CONTAINER -- bash -c "rm -rf /tmp/somefile*"
On 11/17/2017 08:03 AM, Tomasz Chmielewski wrote:
How do I use the variables / wildcards with lxc exec? Say, I want to
remove all /tmp/somefile* in the container.
___
lxc-users mailing list
lx
Greetings, Tomasz Chmielewski!
> lxc exec does not seem to support wildcards:
It's not exec, it's you.
> # lxc exec $CONTAINER -- touch /tmp/file1 /tmp/file2
> # lxc exec $CONTAINER -- ls /tmp/file*
> ls: cannot access '/tmp/file*': No such file or directory
> # lxc exec $CONTAINER -- ls /tmp/
lxc exec does not seem to support wildcards:
# lxc exec $CONTAINER -- touch /tmp/file1 /tmp/file2
# lxc exec $CONTAINER -- ls /tmp/file*
ls: cannot access '/tmp/file*': No such file or directory
# lxc exec $CONTAINER -- ls /tmp/file\*
ls: cannot access '/tmp/file*': No such file or directory