Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to gzip my js files which in js folder.

gzip -cr js

I'm using this command on Terminal but this is result:

8�H�Q�YUG�`]{_��a"G9xj�C�!��Y �c�S�ؙ�SY�}���-mU�����w��@f�x��
                                                                         Q)���k������;�Nߪ�7�x�z�[�Y1E ��
�b�ŹV���ز�7�W���k���!�Z���奩�Vi�HC��r�R��Nj�Q�k�SV[XnL=(v٧p'Ҽ�o�E�P)���vkﱮX|-�t�ii��b!�vF�~F��� �|X���*b
3��y�#�s��8k(��L�o�4�7y�NeNָ��а��(�R��+e^�g�5$��.$tD�{ʔ�YcQ�Z+
cx�
   Ӧc�5�-0Um���Qݫ�B���B�.5 ��U0��?N��1�TOC����-�����#�[j�Je9���J�nv��J���r�us����ϸ����~����Ğ�c_'��q�=��J���^    >���d���F������KRV綶�yꮖ�8��O�׶=Qz@���NqI{Ḧ������7yM=
y�N�e��.'K�|�ZJ��1�ᬇL�  ��s
                        H��ش�6y*(k�{|�ఱ�    
.�KyDi���࿒���k�G�LZ��rsR�ϫ�)e�Nj����Id�64����_�R8U�2�'���^��;�  �<Y����ͨm�+���K�]R��ǝ'��p[_I ��t��E���-Z�ٙAQ3��@넁�-�m'�+�b����G���~���
                                                               [u�Pps�Q<�㖈x̓a�m�ܪ�������쒁����**z�*K]L�Nf8A�L��d���5�ݗ����O����_Y��P:��
����o��
        ����q]��V��<�!Kd݅��e� ��*|%���
                                      jJc�'p�w�J��Q,��D��a�e�*#Ɖ��1�4|��+3D�}t��Hh(��^Ϭ�j��$��#��P��\>J5����A��J��jO�¿

What do you think, what's the problem ? MAybe UTF8 encoding?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The -c switch tells gzip to write the compressed files to stdout. So this funny characters you see are just the compressed content of your files.

Use gzip -r js instead.

share|improve this answer
    
Thank you. Can you explain me what's the meaning of stdout ? –  Eray Jun 8 '11 at 16:59
1  
stdout is the standard output, the output of a command (simplified). stdin in the standard input: data that is typed in the terminal or piped through another program (in cmd | app, the stdout of cmd goes in the stdin of app) –  Lekensteyn Jun 8 '11 at 17:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.