From owner-freebsd-questions@FreeBSD.ORG Wed Jan 17 23:05:07 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C14AD16A4D1 for ; Wed, 17 Jan 2007 23:05:07 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.freebsd.org (Postfix) with ESMTP id 78EBD13C441 for ; Wed, 17 Jan 2007 23:05:07 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from localhost (localhost [127.0.0.1]) by kanga.honeypot.net (Postfix) with ESMTP id 945E1208982 for ; Wed, 17 Jan 2007 17:05:06 -0600 (CST) X-Virus-Scanned: amavisd-new at honeypot.net Received: from kanga.honeypot.net ([127.0.0.1]) by localhost (kanga.honeypot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cPZpb-6smHwv for ; Wed, 17 Jan 2007 17:04:59 -0600 (CST) Received: from kanga.honeypot.net (kanga.honeypot.net [IPv6:2001:470:1f01:224:1::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by kanga.honeypot.net (Postfix) with ESMTP id 6BA6C207CAB for ; Wed, 17 Jan 2007 17:04:59 -0600 (CST) From: Kirk Strauser To: freebsd-questions@freebsd.org Date: Wed, 17 Jan 2007 17:04:50 -0600 User-Agent: KMail/1.9.5 References: <39ed86f90701171215u56acb7c8y49a2c5eb840d0b13@mail.gmail.com> In-Reply-To: X-Face: &'; cS03F?rr_w2Qce.d2f7xmwXfcJWDs>}CkpDw.c]ZJJ_)i0Nx Subject: Re: Grep a file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 23:05:07 -0000 --nextPart1278687.QVxHE5jM9C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 17 January 2007 14:52, Joshua Lewis wrote: > When I run: > sudo grep -v '^\;'extentions.conf > new_extentions.conf > > I get: > -bash: new_extentions.conf: Permission denied You're running grep via sudo, but the redirection is handled by the shell,= =20 wish is still running as you. Either run "sudo -s" to get a root prompt, or: sudo sh -c "grep -v '^\;'extentions.conf > new_extentions.conf" which runs your entire command line, redirection and all, as root. =2D-=20 Kirk Strauser --nextPart1278687.QVxHE5jM9C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFrquY5sRg+Y0CpvERApXzAKCFvoaiTv66dfKNuFVF9KDMhN5OeACaAikb HTJ5QSxVZc6QT2uE67Wj8Vk= =R9OP -----END PGP SIGNATURE----- --nextPart1278687.QVxHE5jM9C--