httpd log errors

Paul Mooring paul at opscode.com
Thu Jul 18 09:00:03 MST 2013


No problem at all, in this case it's pretty much 6 of one half dozen of the other.  I would guess the cases you're trying to remember are related to the `-type f` part of find, in a more complicated scenario find has way more power to selectively choose which files to search (which comes at a performance cost if these are really large projects).  Grep on the other hand will just naively search all files, including binary files which surprises some people, I just like to promote the full power of grep as it's underuse makes my neckbeard itch (please don't `cat my_file.txt|grep` just grep the file).

Paul Mooring
Operations Engineer
www.opscode.com

________________________________________
From: plug-discuss-bounces at lists.phxlinux.org <plug-discuss-bounces at lists.phxlinux.org> on behalf of kitepilot at kitepilot.com <kitepilot at kitepilot.com>
Sent: Thursday, July 18, 2013 8:52 AM
To: Main PLUG discussion list
Subject: Re: httpd log errors

Oops, Paul I answered you too fast and without thinking (imagine that), so I
answered what 'I thought' you were saying instead of what you 'were saying'!

> Just because I like to be nitpick, why over-complicate?
>     grep -r "img" /home/some_v_host/public_html
You are right, in this particular case it can (probably) be done as you say,
but in my experience, I have run into problems that I can't remember now
because I ditched the syntax in favor of 'find' to avoid them long time ago,
and because 'find' is more powerful and allows me more tricks (with other
pitfalls of its on) than grep alone.

I do however recognize that sometimes I am somehow guilty of
'over-complicating' things...   ;-)
ET

PS: It's *DIVERSITY* what makes this list *FUN*!!!


kitepilot at kitepilot.com writes:

> 'over-complicate' is relative...
> I rather use those than *ANY* 'Visual Studio' crap!    ;-)
> ET
>
>
>
>
> Paul Mooring writes:
>
>> Just because I like to be nitpick, why over-complicate?
>>
>>     grep -r "img" /home/some_v_host/public_html
>>
>> Paul Mooring
>> Operations Engineer
>> www.opscode.com
>>
>> ________________________________________
>> From: plug-discuss-bounces at lists.phxlinux.org
>> <plug-discuss-bounces at lists.phxlinux.org> on behalf of
>> kitepilot at kitepilot.com <kitepilot at kitepilot.com>
>> Sent: Tuesday, July 16, 2013 7:52 PM
>> To: keith smith; Main PLUG discussion list
>> Subject: Re: httpd log errors
>>
>> find /home/some_v_host/public_html/ -type f -exec grep -H 'img' "{}" \;
>>
>> :)
>>
>> The best IDE is:
>> vi, make, ctags, find and grep.
>> ET
>>
>>
>>
>> keith smith writes:
>>
>>>
>>>
>>>
>>> Hi,
>>>
>>> I'm looking through my error logs and I have several lines that look
>>> like this:
>>>
>>> File does not exist: /home/some_v_host/public_html/img, referer:
>>> https://www.domain.tld/some_dir/some_script.php
>>>
>>> Usually there is a file and line number to the error.  I've been looking
>>> at my code, however I am not finding the problem.
>>>
>>> Any insight into what this error means is much appreciated.
>>>
>>> Thanks!!
>>>
>>>
>>>
>>> ------------------------
>>> Keith Smith
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss


More information about the PLUG-discuss mailing list