Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running the following command but not all files that I know have this string are being returned and I cannot work out why. Specifically the apache log files which are under this path are not being returned.

grep -rl "eval(base64_decode('" /var/www | xargs ls -l

Can anyone point me to what I need to change to get these files returned too?

share|improve this question
I am not sure , But i think you should try as root . – Raja Dec 27 '12 at 17:29
Nope if I sudo it I get the same results. – williamsdb Dec 27 '12 at 17:32
There is nothing wrong with your command. I tested the same and I'm able to get the results $ sudo grep -rl "eval(base64_decode('" /var/www | xargs ls -l -rw-r--r-- 1 root root 28 Dec 28 00:01 /var/www/drupal/themes/garland/deletethis1.txt -rw-r--r-- 1 root root 34 Dec 28 00:00 /var/www/drupal/themes/garland/deletethis.txt – devav2 Dec 27 '12 at 19:13

The script is fine. I guess that your Apache logs don't contain the text matching the pattern.

share|improve this answer
Strange. Log files definitely contain the string as I have search manually. Have to try something else I guess. – williamsdb Dec 30 '12 at 16:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.