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

How do I create a password protected archive containing all the files with the extension conf from /etc?

share|improve this question

Given that the question was tagged with zip, you're probably looking for something like this:

$ ls /etc/*.conf | xargs zip -e
share|improve this answer
Depending on the permissions of the files added to the zip file, you might need to execute as root. – jcollado Nov 10 '11 at 17:23
thank you i solved the problem – johnny Nov 10 '11 at 17:58
Please mark this answer as accepted if it has solved your issue. – Caesium Dec 7 '11 at 18:05

Considering a very unlikely scenario when *.conf filenames in /etc contain spaces, this is a safe way to zip them:

find /etc -name *.conf -print0 | xargs -0 zip -e
share|improve this answer

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.