"grep" not working
Dirk Moolman
DirkM
Thu May 17 04:24:25 PDT 2007
>From: linux-users-bounces at linux-sxs.org
[mailto:linux-users-bounces at linux->sxs.org] On Behalf Of David Bandel
>Sent: 17 May 2007 01:03 PM
>
>On 5/17/07, Dirk Moolman <DirkM at agilitytech.co.za> wrote:
>> This is something I haven't seen before. One of my developers, uses
>> grep to assist in client queries (to find files and info in unload
>> files).
>>
>> When she does a grep on certain strings, she can't find anything, but
>> when I do the same grep, logged in as root, I find data.
>>
>> What would cause this ? I will have to compare her login with
root's
>> login, but I would appreciate some suggestions / tips from the
guru's.
>>
>This is usually a permissions problem. If she doesn't have permission
>to read the file, the grep will fail. You should get an error message
>unless you have added 2>/dev/null at the end redirecting the error
>channel to the bit bucket.
>
>Also ensure that both of your grep strings are _identical_. Other
>than that, grep is grep.
Both strings are identical yes. I run the command, then su, and then
copy & paste the previous command (from the previous login), and run it
again.
>I also assume you as root and she are running the same grep binary.
>Use `which grep` to make sure.
It looks like we use the same binaries. I have seen the term "tracked
alias" before, but after Googling it, it looks like the same thing as a
normal alias.
[user]
zanettar at myhost> which grep
grep is a tracked alias for /usr/bin/grep
zanettar at myhost> exit
[root]
root at myhost # which grep
/usr/bin/grep
Disclaimer: http://196.33.167.70/disclaimer
More information about the Linux-users
mailing list