Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • f.pop
    Junior Member
    • Aug 2011
    • 5

    Can't extract tar.gz

    Hi,

    I was wondering if someone could help me. I am trying to extract a compressed file (.fq.tar.gz) and I constantly get the following message:

    $ tar -xf ea179s_6_all.fq.tar.gz
    ../ea179s_6_all.fq: Path contains '..'
    tar: Error exit delayed from previous errors.

    Path looks like this:

    /Users/Feri/Desktop/Klaus_Geider/Seq_raw/extr

    therefore I don't get it why I get the: Path contains '..'

    I already tried lots of combinations, like: tar xvf, tar -xvf, the -P option etc.

    Thanx in advance,
  • scd
    Junior Member
    • Mar 2011
    • 2

    #2
    Not sure if you tried this yet, but when untarring a gzipped file you'll need the 'z' option.
    E.g. tar -xzf ea179s_6_all.fq.tar.gz

    Comment

    • GenoMax
      Senior Member
      • Feb 2008
      • 7142

      #3
      Originally posted by f.pop View Post
      Hi,

      I was wondering if someone could help me. I am trying to extract a compressed file (.fq.tar.gz) and I constantly get the following message:

      $ tar -xf ea179s_6_all.fq.tar.gz
      ../ea179s_6_all.fq: Path contains '..'
      tar: Error exit delayed from previous errors.

      Path looks like this:

      /Users/Feri/Desktop/Klaus_Geider/Seq_raw/extr

      therefore I don't get it why I get the: Path contains '..'

      I already tried lots of combinations, like: tar xvf, tar -xvf, the -P option etc.

      Thanx in advance,
      You can also "gunzip" the file first and then untar it later.

      Comment

      • ffinkernagel
        Senior Member
        • Oct 2009
        • 110

        #4
        I suspect that for some reason '../ea17'... is the file name stored in your tar archive.
        What does tar -tfz ea179... output?

        anyhow, it's a good idea to gunzip (or gzip -d) the file first to seperate whether the problem is the tar, or gzip, as these formats are basically nested.

        Comment

        • f.pop
          Junior Member
          • Aug 2011
          • 5

          #5
          Originally posted by scd View Post
          Not sure if you tried this yet, but when untarring a gzipped file you'll need the 'z' option.
          E.g. tar -xzf ea179s_6_all.fq.tar.gz
          I've tried it following your recommendation, but it didn't work...thx anyway

          Comment

          • f.pop
            Junior Member
            • Aug 2011
            • 5

            #6
            Originally posted by ffinkernagel View Post
            I suspect that for some reason '../ea17'... is the file name stored in your tar archive.
            What does tar -tfz ea179... output?

            anyhow, it's a good idea to gunzip (or gzip -d) the file first to seperate whether the problem is the tar, or gzip, as these formats are basically nested.
            The tar file contains 36bp reads (fastq) of a bacterial genome.
            $ tar -tfz ea179s_6_all.fq.tar.gz gives me this (and tha path to the file is correct):
            tar: Error opening archive: Failed to open 'z': No such file or directory

            Gunzip worked fine, so we know that the gzip part is OK, but then again when I tried to untar the now already decompressed archive nothing happens. The system just hangs. I've tried :
            $ tar -xf ea179s_6_all.fq.tar
            or
            $ tar -xvf ea179s_6_all.fq.tar
            or
            $ tar -cf ea179s_6_all.fq.tar

            but nothing helped. Can it be that the file name stored in the archive is different from the one that I see now as ea179s_6_all.fq.tar? Since I got the files from a collaborator and maybe he uses Linux (I don't know), can it be that there are incompatibilities between my Mac system and his?
            Last edited by f.pop; 08-11-2011, 01:13 AM.

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #7
              Originally posted by f.pop View Post
              The tar file contains 36bp reads (fastq) of a bacterial genome.
              $ tar -tfz ea179s_6_all.fq.tar.gz gives me this (and tha path to the file is correct):
              tar: Error opening archive: Failed to open 'z': No such file or directory

              Gunzip worked fine, so we know that the gzip part is OK, but then again when I tried to untar the now already decompressed archive nothing happens. The system just hangs. I've tried :
              $ tar -xf ea179s_6_all.fq.tar
              or
              $ tar -xvf ea179s_6_all.fq.tar
              or
              $ tar -cf ea179s_6_all.fq.tar

              but nothing helped. Can it be that the file name stored in the archive is different from the one that I see now as ea179s_6_all.fq.tar? Since I got the files from a collaborator and maybe he uses Linux (I don't know), can it be that there are incompatibilities between my Mac system and his?
              f.pop,

              I know this going to sound crazy but can you check with your collaborator if they made the tar files on a windows machine (64-bit)? I remember having trouble with tar files that were made on a windows machine before.

              If you have access to a 64-bit windows machine you could try using a program like "7-zip" to see if you can untar the file there.

              Comment

              • f.pop
                Junior Member
                • Aug 2011
                • 5

                #8
                Originally posted by GenoMax View Post
                f.pop,

                I know this going to sound crazy but can you check with your collaborator if they made the tar files on a windows machine (64-bit)? I remember having trouble with tar files that were made on a windows machine before.

                If you have access to a 64-bit windows machine you could try using a program like "7-zip" to see if you can untar the file there.

                Thanx for the ideea, I'll try it. This could be the only explanation that's left.

                Comment

                • gringer
                  David Eccles (gringer)
                  • May 2011
                  • 845

                  #9
                  Originally posted by f.pop View Post
                  $ tar -tfz ea179s_6_all.fq.tar.gz gives me this (and tha path to the file is correct):
                  tar: Error opening archive: Failed to open 'z': No such file or directory
                  This is because the ordering of the options are not what tar expects. the 'f' option must always be followed by a file name, so a better ordering would be this:
                  Code:
                  tar -tzf ea179s_6_all.fq.tar.gz
                  That will give you a listing of all the files in your archive. I suspect that the issue is that the files in the archive start with '/' (i.e. absolute location), and the usual process is to use relative locations when compressing / extracting (although looking at the help for the '-P' options in the tar man page, the default is to strip the leading '/'). If you want to explicitly strip the first specified directory (which may be '..'), then you can use the '--strip-components' option:
                  Code:
                  tar --strip-components=1 -xzf ea179s_6_all.fq.tar.gz
                  Note that since about 5 years ago (possibly longer), GNU tar is able to automatically determine whether the file was a gzipped or bzipped archive, so the z/b options aren't actually necessary on most Linux systems.

                  Comment

                  Latest Articles

                  Collapse

                  • GATTACAT
                    Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                    by GATTACAT
                    Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                    07-01-2026, 11:43 AM
                  • SEQadmin2
                    Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                    by SEQadmin2


                    I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                    Here are nine questions we think about, in roughly the order they matter, before...
                    06-18-2026, 07:11 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 07-02-2026, 11:08 AM
                  0 responses
                  23 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-30-2026, 05:37 AM
                  0 responses
                  23 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-26-2026, 11:10 AM
                  0 responses
                  23 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-17-2026, 06:09 AM
                  0 responses
                  55 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...