Bugzilla – Bug 58
Clean File
Last modified: 2001-11-22 12:51:06 MST
The following command works correctly in AIX, where in root is owner, but in Hp- ux the command doesn't work: sudo echo "" > /file The error is: Ksh: Cannot create
Redirection happens in the shell long before sudo is even executed. That is why the error message is coming from ksh, _not_ sudo. If what you want to do is truncate a file with sudo you can use something like 'cp /dev/null file'.