Gentoo Archives: gentoo-user

From: "赵佳晖" <jiahui.tar.gz@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Problem with sudo
Date: Wed, 04 Jul 2012 00:40:49
Message-Id: CAJf79njq_FerEvXJd4Cn__Oh7_oz2a_aJYkqVZy5F8LknyQnnQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Problem with sudo by Willie WY Wong
1 Oh,yes , i misunderstand it . Thank you
2
3 2012/7/3 Willie WY Wong <wongwwy@××××××××××.org>
4
5 > On Sun, Jul 01, 2012 at 10:41:12AM +0800, Penguin Lover 赵佳晖 squawked:
6 > > I have use your method , it didn't work .
7 > > Like:
8 > > sudo echo "sys-boot/grub:2 **" >>
9 > > /etc/portage/package.accept_keywords/package.keywords.grub2 echo
10 > > "sys-boot/grub:2 **" | sudo tee
11 > > /etc/portage/package.accept_keywords/package.keywords.grub2
12 > >
13 > > And the result :
14 > > zjhui@gentoo ~ $ ls -l
15 > > /etc/portage/package.accept_keywords/package.keywords.grub2
16 > > -rw-r--r-- 1 root root 0 Jul 1 10:37
17 > > /etc/portage/package.accept_keywords/package.keywords.grub2
18 > >
19 > > It's an empty file.
20 >
21 > I think you misread the e-mail. The left hand side below is what you
22 > **shouldn't** do. The right hand side is what you **should** do. So
23 > you **should** run
24 >
25 > echo "sys-boot/grub:2 **" | sudo tee
26 > /etc/portage/package.accept_keywords/package.keywords.grub2
27 >
28 > and no more.
29 >
30 > W
31 >
32 > >
33 > > > If Neil is right, you may want to read man tee. It work roughly like
34 > > > that:
35 > > > instead of do
36 > > > sudo echo sthg > /etc/file.cfg echo sthg | sudo tee /etc/file.cfg
37 > > > sudo echo sthg >> /etc/file.cfg echo sthg | sudo tee -a /etc/file.cfg
38 >
39 >
40 >
41
42
43 --
44 好好学习,天天向上!!!