1 |
On 3/23/06, JimD <Jim@×××××××××××××××××.org> wrote: |
2 |
> I have been using Linux for a number of years and the one "trick" I |
3 |
> have never read how to do is something like: |
4 |
> |
5 |
> sudo echo "app-portage/porthole ~*" >> /etc/portage/package.keywords |
6 |
|
7 |
if you do this, you'll execute sudo echo and try to redirect the |
8 |
output as the normal user, because the shell doesn't know you're |
9 |
sudoying ;) |
10 |
|
11 |
Sudo takes a command as parameter, enclose the whole command in quotes |
12 |
and try again, like this: |
13 |
|
14 |
sudo "echo "app-portage/porthole ~*" >> /etc/portage/package.keywords" |
15 |
|
16 |
> |
17 |
> Another one I always wanted to know if it is possible is: |
18 |
> |
19 |
> sudo > /var/log/foo.log |
20 |
|
21 |
Same as above... |
22 |
|
23 |
> |
24 |
> Both give me error message. Are either of these command possible? |
25 |
> |
26 |
> I used to always just use su, though now I like sudo better. I just |
27 |
> can't for the life of me get "sudo echo" or "sudo >" to work. I can |
28 |
> sudo su and then do the commands, however I am lazy and want to save |
29 |
> having to "exit" out from su. |
30 |
> |
31 |
> Jim |
32 |
> -- |
33 |
> gentoo-user@g.o mailing list |
34 |
> |
35 |
> |
36 |
|
37 |
|
38 |
-- |
39 |
Daniel da Veiga |
40 |
Computer Operator - RS - Brazil |
41 |
-----BEGIN GEEK CODE BLOCK----- |
42 |
Version: 3.1 |
43 |
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V- |
44 |
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++ |
45 |
------END GEEK CODE BLOCK------ |
46 |
|
47 |
-- |
48 |
gentoo-user@g.o mailing list |