What does .tar-1 in a filename obtained by gunzip a tar.gz mean?

I downloaded a zipped tar-file filename.tar.gz and after converting it with the gunzip command it is now named filename.tar-1. What does the -1 mean?

2

1 Answer

You would see this behavior if your gunzip is aliased to gunzip -N and the original file name was filename-1. To illustrate:

$ ls
filename-1
$ gzip filename-1
$ mv filename-1.gz filename.gz
$ gunzip -Nv filename.gz
filename.gz: -0.5% -- replaced with filename-1

From man gunzip:

 -N --name When compressing, always save the original file name and time stamp; this is the default. When decompressing, restore the original file name and time stamp if present. This option is useful on systems which have a limit on file name length or when the time stamp has been lost after a file transfer.
0

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