LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Change Name after gzip (https://www.linuxquestions.org/questions/linux-general-1/change-name-after-gzip-534691/)

sunhui 03-05-2007 04:53 AM

Change Name after gzip
 
I know the default gzip file is .gz , for example , if gzip a file "test.txt" , then the zipped file name is "test.txt.gz" , if I want to change the extension of zipped to "test.txt.oc" , except use mv after gzip , can advise what can I do ? thx

acid_kewpie 03-05-2007 04:56 AM

well you can use the -S option to override the default extension if you really want to.

colucix 03-05-2007 05:00 AM

You can choose the suffix with option -S, e.g.
Code:

gzip -S .oc test.txt
but if you try to gunzip a file with extension .oc, gzip is not able to recognize it and you have to rename again!

Edit: sorry for repetition! I did not see the answer from acid_kewpie before posting.


All times are GMT -5. The time now is 03:16 PM.