Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I write a command that searches the /var/www directory for all files with the name ".htaccess" and outputs the full location/path to each of the .htaccess files into a file?

This would save me a lot of time if this is possible with a unix command. I am running debian, lenny if that helps.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted
find /var/www -name .htaccess > yourfilelist

will do this. For more details, see man find.

share|improve this answer
add comment

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.