0

I am new to ubuntu (got it last week) and I am having trouble opening .tar files. It comes up with this error:

tar (child): tor-browser-linux64-6.0.3_en-US.tar.xz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

I have tried this with many files but it is the same error. It is probably something simple but I am not used to OS. Thanks =)

Szczepan
  • 268

2 Answers2

2

You cant 'open' a .tar file, you need to unzip them like you would at windows, to do this do the following

  1. make a folder using mkdir foldername
  2. move the tar into the folder mv filename.tar.extension foldername
  3. move inside the folder using cd foldername
  4. unzip it (I call it untar :P) using tar xf filename.tar
  5. now you see a lot of files or not as much depending on what is in it
Szczepan
  • 268
patrick
  • 513
0

if the tar archive is compressed you have two options:

  1. use the integrated option of tar to handle compressed files:

    tar tzf mycompressedtar.tar.z (for gzip compressed files)

    (or "j" for bzipped files which have a higher compression rate)

    tar tjf mybzipcompressedfile.tar.bzip2

  2. you can also use a shell pipe.. do decompress first and feed the result directly into tar:

    gzip -dc mygzipcompressed.tgz | tar tf -

    (analog for bzip2 compressed files)

Note: the nice Unix tool "file" helps you identify what compression has been used.