I have a tar.gz called "first.tar.gz". Inside it I have only one folder called "first" (no other folders or files). I want to decompress the tar.gz, so the folder "first" renames to "second".
I tried this:
tar -zxf first.tar.gz --transform s/first/second/
but it didn't work for me. I didn't get any errors / response, it just extracted the "first" folder without renaming. The version of tar is 1.26
tar -ztf first.tar.gz
?first/
tar -ztf
. Your--transform
works in tar 1.30.tar -zxf …
" should be "I triedtar -vzxf …
" and "it just extracted" should be "it printed". Then the answer would fit.