Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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,

  • #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


    • #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


      • #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


        • #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


          • #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


            • #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


              • #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


                • #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

                  • seqadmin
                    Current Approaches to Protein Sequencing
                    by seqadmin


                    Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                    04-04-2024, 04:25 PM
                  • seqadmin
                    Strategies for Sequencing Challenging Samples
                    by seqadmin


                    Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                    03-22-2024, 06:39 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, 04-11-2024, 12:08 PM
                  0 responses
                  27 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 10:19 PM
                  0 responses
                  30 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 09:21 AM
                  0 responses
                  26 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-04-2024, 09:00 AM
                  0 responses
                  52 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X