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.

find /var/www -name .htaccess > yourfilelist

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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