Hi

I am trying to compress a file. But I want my original file to be there.
eg. if I have file named file1
then after compressing I should have 2 files:
file1
file1.z

(I googled and tried gzip and zcat but couldn't do it)
Thanks

Recommended Answers

did you try looking at the man page for gzip?

Jump to Post

All 2 Replies

did you try looking at the man page for gzip?

Member Avatar
>>gzip -c file1>>file1.gz
e.g
 >>gzip -c hello.c>>hello.gz
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.