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'm trying to compress only two files in a directory. Let's say I have a directory named 'images'. In the directory, I have a.jpg, b.jpg, c.jpg, and d.jpg. I like to compress only a.jpg and b.jpg using tar.

I googled about it, but weirdly I could not find it!

share|improve this question
2  
found out: tar cvfz file.tar.gz a.jpg b.jpg –  user45326 Jun 20 '11 at 8:38

1 Answer 1

up vote 4 down vote accepted

Maybe:

tar cvf output.tar images/{a,b}.jpg

?

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.