Date: Wed, 17 Jan 2007 17:04:50 -0600 From: Kirk Strauser <kirk@strauser.com> To: freebsd-questions@freebsd.org Subject: Re: Grep a file Message-ID: <200701171704.56589.kirk@strauser.com> In-Reply-To: <B43C5A3B-2DE3-4853-84FF-524B7C3F3D71@familyfunzone.net> References: <CDC3A051-F2E4-43E6-9200-9272C3C432FE@familyfunzone.net> <39ed86f90701171215u56acb7c8y49a2c5eb840d0b13@mail.gmail.com> <B43C5A3B-2DE3-4853-84FF-524B7C3F3D71@familyfunzone.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701171704.56589.kirk>