Results 1 to 4 of 4

Thread: How to copy/install tar.gz file from DVD ROM

  1. #1
    Join Date
    Jan 2013
    Beans
    75

    How to copy/install tar.gz file from DVD ROM

    Hi,
    I have a program on a DVD ROM to install. I use GUI window to copy that file to home folder. When I extract that file, it complaints format error:

    MS-7696:/usr/local/CCSv5# sudo tar -xzvf /home/ruwan2/setup_CCS_5.0.3.00028.tar.gz ./

    gzip: stdin: invalid compressed data--format violated
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now

    I suspect the copy results the error, but I do not know what command line can copy that tar.gz file to hard drive. Or you have better ideas for my problem.

    Thanks

  2. #2
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,806
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How to copy/install tar.gz file from DVD ROM

    You can use cp to copy using the command line, but I don't think using the gui caused file corruption . Yet this archive seems corrupted. You could check by calculating the md5sum of the original and your copy, or let gzip (called by tar) read from the dvd directly. You may also have a bad dvd.

  3. #3
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How to copy/install tar.gz file from DVD ROM

    What is the trailing ./ there for?

    Code:
    # sudo tar -xzvf /home/ruwan2/setup_CCS_5.0.3.00028.tar.gz ./
    'tar' is probably treating that as a second archive file (and failing because it obviously isn't)

    If you want to extract to a specific directory you need to use the -C switch I think e.g.

    Code:
    # sudo tar -xzvf /home/ruwan2/setup_CCS_5.0.3.00028.tar.gz -C ./

  4. #4
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,806
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How to copy/install tar.gz file from DVD ROM

    Quote Originally Posted by steeldriver View Post
    What is the trailing ./ there for?

    Code:
    # sudo tar -xzvf /home/ruwan2/setup_CCS_5.0.3.00028.tar.gz ./
    'tar' is probably treating that as a second archive file (and failing because it obviously isn't)

    If you want to extract to a specific directory you need to use the -C switch I think e.g.

    Code:
    # sudo tar -xzvf /home/ruwan2/setup_CCS_5.0.3.00028.tar.gz -C ./
    +1

    I didn't see that ./. Actually, the default is to unpack in the current directory, so you don't need it at all.

    Although, my tar gives a different error message when I try this:
    Code:
    $ tar -xvzf randomtarball.tar.gz ./
    tar: .: Not present in archive

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •