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

did you try looking at the man page for gzip?

Member Avatar for b1izzard
>>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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.