I have a file called error.log on my server that I need to frequently truncate. I have rw permissions for the file. Opening the file in vi > deleting all content > saving wo
Since sudo will not work with redirection >, I like the tee command for this purpose
>
tee
echo "" | sudo tee fileName