Hi Forum,
I am trying to use cat to create a file via pct exec.
But I cannot work out the correct syntax to achieve. The folder I want to write to exists, below is the syntax I have attempted.
Could I also ask what the -- means here. I have seen some examples with this. In the below both return the same data
I am trying to use cat to create a file via pct exec.
But I cannot work out the correct syntax to achieve. The folder I want to write to exists, below is the syntax I have attempted.
Code:
root@pve:~# pct exec 404 ls /etc/systemd/system/deluged.service.d
root@pve:~# pct exec 404 cat <<'EOF' > /etc/systemd/system/deluged.service.d/user.conf
[Service]
User=debian-deluged
Group=debian-deluged
EOF
-bash: /etc/systemd/system/deluged.service.d/user.conf: No such file or directory
Could I also ask what the -- means here. I have seen some examples with this. In the below both return the same data
Code:
rroot@pve:~# pct exec 404 cat /etc/hosts
root@pve:~# pct exec 404 -- cat /etc/hosts