Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cat won’t write the file. If you mean `command | sudo cat > file.txt`, that won’t work because the redirection is still happening in the non-root shell. You could do `command | sudo sh -c "cat > file.txt"` but that’s rather verbose.


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

Search: