I am trying to copy a file with lxc, now I am already desperate. Here are some commands that I have tried:
#temp=$(cat 2.sh)
#lxc-attach -n containerName echo $temp > /root/2.sh
#lxc-attach -n containerName cat /root/2.sh
->
#temp=$(cat 2.sh)
#lxc-attach -n containerName -- bash -c 'echo $temp > /root/2.sh'
#lxc-attach -n containerName cat /root/2.sh
->
#lxc-attach -n containerName -- bash -c 'echo $(cat 2.sh) > /root/2.sh'
->cat: 2.sh: No such file or directory
#lxc-attach -n containerName -- bash -c 'echo "$(cat 2.sh)" > /root/2.sh'
->cat: 2.sh: No such file or directory
#lxc file push 2.sh containerName/root/
->Error: not found
The ->
is the output
Containers are built with lxc-
and do not appear in the lxc list
list, but in the lxc-ls
list.
Any help is welcome