sudo cat << EOF> File doesn't work, sudo su does

前端 未结 5 1663
南笙
南笙 2020-12-23 09:23

I tried the following on the command prompt in bash:

sudo cat << EOF > /etc/yum.repos.d/some-name.repo
#Content
#....
#...
EOF

It

5条回答
  •  有刺的猬
    2020-12-23 09:57

    Another option is tee.

    cat << EOF | sudo tee -a /etc/yum.repos.d/some-name.repo
    ...
    EOF
    

提交回复
热议问题