3
votes
2answers
2k views

Equivalent to tar's “--strip-components=1” in unzip?

I have a script that extracts a tar.gz-file to a speificed subdirectory mysubfolder: mkdir mysubfolder; tar --extract --file=sourcefile.tar.gz --strip-components=1 --directory=mysubfolder; Is there ...
24
votes
1answer
38k views

How do I unzip a tar gz archive to a specific destination?

I want to unpack a .tar.gz file to a specific directory. The archive file is in /root/Documents. I want to unzip it into /root/Desktop/folder. The folder structure in zipped file should be preserved ...
12
votes
8answers
213k views

How to extract a tar file (.tgz) in windows?

How to extract a tar file (.tgz) in windows? Is this possible, or do I have to get into a linux environment and extract it?
0
votes
4answers
4k views

tar.gz won't extract on Mac OS X

Why is this not working? sh-3.2# tar -xzf postgresql-7.4.28.tar.gz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error exit delayed from previous errors