Do I need to convert to gzip format or tar format?

$file ccache-2.4.tar.gz
ccache-2.4.tar.gz: HTML document, ASCII text

The file, ccache-2.4.tar.gz is in the ASCII test format

 ccache-2.4.tar.gz: not in gzip format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

kindly provide your suggestion

2

2 Answers

The file available in is really a tar archive. Therefore, the real question is not "How do I convert it from ASCII to tar format", but "Why does the file is an ASCII file instead of a tar?"

Probably, you downloaded the file incorrectly (and ASCII file contains the error strings returned by the server), or who gave you the file did. Use a browser to download it or, if you want to do it by terminal, run:

curl -sfL "" -o ~/Downloads/ccache-2.4.tar.gz

or

wget -nv "" -O ~/Downloads/ccache-2.4.tar.gz

The file ccache-2.4.tar.gz will be downloded in your ~/Downloads directory.

Since it is not a tar file but ASCII you can rename the file: remove 'tar.gz" and replace it by ".txt" with...

cp ccache-2.4.tar.gz ccache-2.4.txt

and you will be able to view the contents with "more", "less" or a text editor.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like