dapper sudo

Toby Kelsey toby_kelsey at ntlworld.com
Tue Jul 4 13:44:14 UTC 2006


boricua wrote:
> how come dapper does not allow me to do this
> 
>  sudo cat /dev/null >  /var/log/apache2/error.log
> 

Because the sudo only applies to the command 'cat', not the redirection.

Try
   sudo dd of=/var/log/apache2/error.log < /dev/null
or
   sudo tee /var/log/apache2/error.log < /dev/null


It is a bug that there is no obvious command to truncate a file.

Toby




More information about the ubuntu-users mailing list