How to gzip a directory directly ?# Unix - 噫吁兮,危乎高哉
I*A
1 楼
I have a huge directory.
I want to archive it.
I used tar:
tar -cvf Myproject.tar Myproject
then used gzip:
gzip Myproject.tar
to generate .gz file.
But, the intermediate myproject.tar is too big, like 400GB.
I want to know how I can compress the directory directly.
Because the file is very huge, I doubt if tar pipe gzip works.
I saw there is tar -z can compress directly when we tar it. But my ksh does
not have this -z option.
I want to archive it.
I used tar:
tar -cvf Myproject.tar Myproject
then used gzip:
gzip Myproject.tar
to generate .gz file.
But, the intermediate myproject.tar is too big, like 400GB.
I want to know how I can compress the directory directly.
Because the file is very huge, I doubt if tar pipe gzip works.
I saw there is tar -z can compress directly when we tar it. But my ksh does
not have this -z option.