04-02-2022, 04:06 PM
(04-02-2022, 02:50 PM)Tim Curtis Wrote: It's prolly cos when doing "sudo echo" the echo won't run as root due to how the shell functions.
Try piping instead
Code:# Write/overwrite
echo "Some text" | sudo tee /directory/.mpdignore >/dev/null
# Append
echo "Some text" | sudo tee -a /directory/.mpdignore >/dev/null
# NOTE: The >/dev/null is just to prevent the text from being echoed to the console.
Good point. I was fixated on actually editing a file or copying it in from somewhere else.