I have 100 files: cvd1.txt cvd2.txt ... cvd100.txt
How to gzip 100 files into one .gz file so that after I gunzip it, I should have cvd1.txt, cvd2.txt ... cvd100.txt separately?
Thanks for your help
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
if you have zip,
Don't need to | |||||
feedback
|
|
You want to
To untar the gzip'd tar file you would do:
This would extract your files under the | |||||||
feedback
|
|
You'll want to use tar, like so:
tar puts the files together, while gzip then performs the compression. Quoth the gzip manpage:
| |||
|
feedback
|
|
gzip by itself does not know anything about file structure. To do what you want, you need to first put the files into some kind of container file (e.g. a tar structure, or similar) and then gzip that. tar has z and j (for bzip2) switches on GNU platforms to do this. | |||||
feedback
|