Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
   Ӧ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
.�KyDi���࿒���k�G�LZ��rsR�ϫ�)e�Nj����Id�64����_�R8U�2�'���^��;�  �<Y����ͨm�+���K�]R��ǝ'��p[_I ��t��E���-Z�ٙAQ3��@넁�-�m'�+�b����G���~���
        ����q]��V��<�!Kd݅��e� ��*|%���

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

share|improve this question
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
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


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.