1 |
Le Sat, 30 Jun 2012 19:48:28 +0100, |
2 |
Neil Bothwick <neil@××××××××××.uk> a écrit : |
3 |
|
4 |
> On Sun, 1 Jul 2012 01:27:49 +0800, 赵佳晖 wrote: |
5 |
> |
6 |
> > In some cases , when i run somethings with "sudo" , it tells me |
7 |
> > "Permission Denied" , then i should turn to root . i forgot to |
8 |
> > record the cases . Did anyone have any ideas ? |
9 |
> |
10 |
> Are you trying to redirect the output? That can give this message |
11 |
> because the redirection is performed as the user running sudo, not as |
12 |
> root. |
13 |
> |
14 |
> |
15 |
|
16 |
If Neil is right, you may want to read man tee. It work roughly like |
17 |
that: |
18 |
instead of do |
19 |
sudo echo sthg > /etc/file.cfg echo sthg | sudo tee /etc/file.cfg |
20 |
sudo echo sthg >> /etc/file.cfg echo sthg | sudo tee -a /etc/file.cfg |
21 |
-- |
22 |
Éric DUNAND |