I'm unable to figure out how to easily do this. I'm interested in extracting all image files from a tar file. I'd like to be able to do something like this:
tar -x the_file.tar -type=*.jpeg *.jpg *.gif ...
or whatever. Any suggestions? I write a quick script to do that for me, but I'd like to know if tar can do that for me easier than my method.
Thanks.
get rid of "-type=" and you have your answer. example:
bill:~/tmp billyc$ tar cvf archive.tar file*
file1.jpg
file2.txt
file3.gif
file4.txt
file5.jpg
bill:~/tmp billyc$ tar xvf archive.tar *.jpg *.gif
file1.jpg
file3.gif
file5.jpg
OK, cool- I tried something very similar to that in my testing but I didn't get the exact syntax down. Thanks.