Gentoo Archives: gentoo-user

From: Willie WY Wong <wongwwy@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Problem with sudo
Date: Tue, 03 Jul 2012 12:52:50
Message-Id: 20120703125054.GA5564@mathaapc14.epfl.ch
In Reply to: Re: [gentoo-user] Problem with sudo by "赵佳晖"
1 On Sun, Jul 01, 2012 at 10:41:12AM +0800, Penguin Lover 赵佳晖 squawked:
2 > I have use your method , it didn't work .
3 > Like:
4 > sudo echo "sys-boot/grub:2 **" >>
5 > /etc/portage/package.accept_keywords/package.keywords.grub2 echo
6 > "sys-boot/grub:2 **" | sudo tee
7 > /etc/portage/package.accept_keywords/package.keywords.grub2
8 >
9 > And the result :
10 > zjhui@gentoo ~ $ ls -l
11 > /etc/portage/package.accept_keywords/package.keywords.grub2
12 > -rw-r--r-- 1 root root 0 Jul 1 10:37
13 > /etc/portage/package.accept_keywords/package.keywords.grub2
14 >
15 > It's an empty file.
16
17 I think you misread the e-mail. The left hand side below is what you
18 **shouldn't** do. The right hand side is what you **should** do. So
19 you **should** run
20
21 echo "sys-boot/grub:2 **" | sudo tee /etc/portage/package.accept_keywords/package.keywords.grub2
22
23 and no more.
24
25 W
26
27 >
28 > > If Neil is right, you may want to read man tee. It work roughly like
29 > > that:
30 > > instead of do
31 > > sudo echo sthg > /etc/file.cfg echo sthg | sudo tee /etc/file.cfg
32 > > sudo echo sthg >> /etc/file.cfg echo sthg | sudo tee -a /etc/file.cfg

Replies

Subject Author
Re: [gentoo-user] Problem with sudo "赵佳晖" <jiahui.tar.gz@×××××.com>