Questions tagged [tar]

a utility to archive files into a sequential stream, then commonly placed into one file on disk (previously tapes, hence the name, Tape ARchive)

546 questions
1050
votes
8 answers

What command do I need to unzip/extract a .tar.gz file?

I received a huge .tar.gz file from a client that contains about 800 mb of image files (when uncompressed.) Our hosting company's ftp is seriously slow, so extracting all the files locally and sending them up via ftp isn't practical. I was able to…
EmmyS
  • 14,720
  • 13
  • 39
  • 51
942
votes
12 answers

How do I uncompress a tarball that uses .xz?

I'm used to extracting tarballs with a -xfz flag, which handles gzip and bzip2 archives. Recently I've run into a .tar.xz file and I would like to uncompress it in one step using tar, how can I do that?
Jorge Castro
  • 69,284
  • 123
  • 459
  • 651
864
votes
5 answers

How to extract files to another directory using 'tar' command?

I thought tar archive.tar /users/mylocation would work, but it doesn't. How can I do that?
shawnxuc
  • 8,743
  • 3
  • 14
  • 4
282
votes
3 answers

How to unzip .tgz file using the terminal?

I've downloaded mongodb-linux-x86_64-2.6.3.tgz file using windows 7 and kept it on D:\Amra\Software\Developing Soft location. When I right click this .tgz file using Ubuntu and see property it shows Location: /media/towhid/Amra/Software/Developing…
Towhid
  • 3,665
  • 3
  • 15
  • 11
146
votes
1 answer

How do I extract a specific file from a tar archive?

Is it possible to restore a single file from the .tar backup? I don't want to restore total backup. I just want to restore one single file from the backup.
rɑːdʒɑ
  • 97,211
  • 101
  • 250
  • 322
143
votes
6 answers

In SSH, how do I mv to my local system?

I ssh-ed into my webhost's directory, and tar-ed the webapp to download. When I try to mv to ~/mydirectory/backups or /home/mydirectory/backups, it defines the "home" as my root on the webhost that I'm ssh'ed into. How do I mv in ssh to a local…
JeanSibelius
  • 3,442
  • 7
  • 22
  • 25
123
votes
3 answers

how to extract tar.7z files from command line?

Is there a way to extract files of tar.7z format using command line tools in Ubuntu?
pacodelumberg
  • 1,375
  • 2
  • 10
  • 7
71
votes
2 answers

Compress in .tgz

I want to compress files in .tgz. I know how to make tar.gz(with tar and gzip) and some people say it is almost the same, but I need to make a .tgz, how??
RocketMan
  • 981
  • 2
  • 7
  • 7
58
votes
1 answer

Recursive tar compression?

I'd like to create a tar file to compress a folder that contains sub folders. I'm trying with the following command int in the terminal: tar -czf folder directorios.tar.gz directorios.tar.gz would be the result
Sam
  • 625
  • 1
  • 5
  • 9
49
votes
1 answer

How to extract .tar.bz2?

I'm downloading an engine game file which is compressed as .tar.bz2. I'm trying this command tar -zxvf enginsxt.tar.bz2 And it throws an error. I know that command tar -zxvf is only for extracting .tar.gz files, but how can I decompress this one?
WapDL
  • 501
  • 1
  • 4
  • 3
45
votes
5 answers

Encrypt tar.gz file on create

I have a script which creates a nightly backup of several directories. It is created using tar -czf, and the destination tar.gz file path is on a mounted network directory. The resulting file is about 1.2Gb large. The network speed is reasonably…
Joel L
  • 551
  • 1
  • 5
  • 10
41
votes
5 answers

What's the best way to use parallel bzip2 and gzip by default?

Bzip2 and gzip only use one core, although many computers have more than one core. But there are programs like lbzip2, pbzip2 and pigz, which use all available cores and promise to be compatible with bzip2 and gzip. So what's the best way to use…
elmicha
  • 9,250
  • 4
  • 31
  • 48
41
votes
4 answers

How can I update a tar.gz file?

I have created a tar.gz file (using the GUI, not the command line). How can I update it with a command that new files are added and modified files are updated, too?
xpanta
  • 1,391
  • 3
  • 12
  • 22
34
votes
2 answers

Why I can't uncompress a .bz2 file using tar?

So I have this wikipedia dump sized at about 10gb and named as "enwiki-latest-pages-articles.xml.bz2". I have been trying the following commands in the terminal to unzip the dump: tar jxf enwiki-latest-pages-articles.xml.bz2 And tar xvf…
Arun Mohan
  • 705
  • 3
  • 7
  • 9
32
votes
2 answers

gzip: stdin: not in gzip format

When I run: tar -zxvf john-1.7.0.2.tar.gz I get this: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now It should start unpacking. Some people told me not to use the z but I get the same…
Red fusion team
  • 421
  • 1
  • 4
  • 5
1
2 3
36 37