how to write the standard output to an unwritable with sudo?

2008-03-29 Thread lveax
$ whoami
v


$ ll a
-rw-r--r--  1 root  v  0 Mar 30 10:02 a

$ sudo cat  a
a: Permission denied.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to write the standard output to an unwritable with sudo?

2008-03-29 Thread Giorgos Keramidas
On Sun, 30 Mar 2008 10:13:02 +0800, lveax [EMAIL PROTECTED] wrote:
 $ whoami
 v

 $ ll a
 -rw-r--r--  1 root  v  0 Mar 30 10:02 a

 $ sudo cat  a
 a: Permission denied.

You have to redirect output 'within' sudo, so try using:

sudo sh -c 'cat  unwritable'

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]