Hacker News new | past | comments | ask | show | jobs | submit login




This won't work. You only elevate the privileges of the curl process, while the redirected output was opened by your shell beforehand.

  curl https://github.com/art-dot-git/80x40/blob/master/README | sudo tee /etc/motd >/dev/null


You didn't actually try it, did you? :>

It should be:

sudo curl -L https://github.com/art-dot-git/80x40/raw/master/README -o /etc/motd


yeah I wouldn't run that, the content of that url looks nasty. any chance it could buffer override the motd command?


Here's yet another way:

  sudo bash -c 'curl https://github.com/art-dot-git/80x40/blob/master/README > /etc/motd'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: