Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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

$ ls /etc/*.conf | xargs zip myfile.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
add comment

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 archive.zip -e
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.