Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to list all suhosin.ini files under /etc/php5/ directory. The thing is that the 3 of them are one level deeper in the directory tree. I want to combine these two to one command

# ls  /etc/php5/*/*/suhosin.ini
/etc/php5/apache2/conf.d/suhosin.ini  /etc/php5/cgi/conf.d/suhosin.ini  /etc/php5/cli/conf.d/suhosin.ini

# ls  /etc/php5/*/suhosin.ini
/etc/php5/conf.d/suhosin.ini

I tried to use ls /etc/php5/ -R and pipe it to grep but i couldnt do what i want which is get a list like that

/etc/php5/apache2/conf.d/suhosin.ini
/etc/php5/cgi/conf.d/suhosin.ini
/etc/php5/cli/conf.d/suhosin.ini
/etc/php5/conf.d/suhosin.ini
share|improve this question

migrated from stackoverflow.com Dec 25 '12 at 22:05

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 4 down vote accepted

Use find:

$ find /etc/php5 -name suhosin.ini
share|improve this answer

Your Answer

 
discard

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.