Gentoo Archives: gentoo-user

From: JimD <Jim@×××××××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] sudo echo
Date: Thu, 23 Mar 2006 23:04:52
Message-Id: 20060323173347.4713d52a@keelie.localdomain
In Reply to: Re: [gentoo-user] sudo echo by Holly Bostick
1 On Thu, 23 Mar 2006 22:25:29 +0100
2 Holly Bostick <motub@××××××.nl> wrote:
3
4 > JimD schreef:
5 > >
6 > > Another one I always wanted to know if it is possible is:
7 > >
8 > > sudo > /var/log/foo.log
9 >
10 > ...I have no idea what result you might expect).
11
12 If you type something like the following:
13
14 "> /tmp/myfile.foo"
15
16 It will truncate the file. I use it when I want to clear out logs real
17 quick. I can sudo su and then just type (without the quotes):
18
19 "> /var/log/mail/current"
20
21 and have a clean log. However to do that I need to be root and the
22 only thing I found is to sudo su and then type the command and then
23 exit from root.
24
25 >
26 > Good luck,
27 > Holly
28
29 Thanks : )
30
31 Jim
32 --
33 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] sudo echo "Boyd Stephen Smith Jr." <bss03@××××××××××.net>