Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Tar command has me stumped...

  1. #1

    Default Tar command has me stumped...

    I'm embarrassed to even have to ask this, as I have been using Linux for years, albeit not soley on the command line, as I am now...

    I downloaded minidlna, which comes packaged as a .tar.gz file archive. When I extract it with "tar -xvf minidlna.xxxxx", it extracts a "usr" directory and an "etc" in my home directory (as that is where the tar archive is when I extract it). How can I safely extract this tar archive and merge the resulting directories into my existing system? I attempted to use "cp -Ri etc/ /etc/" but the resulting filesystem looked like "/etc/etc/minidlna.conf" and the same happened for the "usr" directory (e.g. /usr/usr/xxxx).

    This is so simple, but I've never had to deal with a tar archive packaged this way before.

    Thanks for any insight, and any snickering that you could give me
    Last edited by vwgtiturbo; 25-Oct-2011 at 22:19. Reason: Account is messed up, can't change contact email, and old email is no longer accesible

  2. #2

    Default Re: Tar command has me stumped...

    Hello there! Please reply to this post instead of my original question. For some reason, my Novell/Suse Forum accounts are completely messed up, and I had to create a new account, as my 'vwgtiturbo' account uses an email address I haven't had in years (and no longer have access to). For whatever reason, the forum control panel wouldn't let me change it, saying that my password was incorrect (although I had just logged in with that password).

    Anyway, thanks for any insight!
    Last edited by vwgiturbo77; 25-Oct-2011 at 22:38. Reason: Email subscription

  3. #3
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Tar command has me stumped...

    first: the machine you wish to add minidlna to, what is the operating
    system and version in use on that machine? please show us the terminal
    output from

    Code:
    cat /etc/SuSE-release
    uname -a
    second: just unpacking a tarball should make only one directory (and
    that one would be neither /usr nor /etc, so what happens if you issue
    this command from a user terminal:

    Code:
    tar xzvf minidlna_1.0.22_src.tar.gz
    and follow other bread crumbs (for example) here:
    http://www.tuxfiles.org/linuxhelp/softinstall.html

    --
    DD
    openSUSE®, the "German Automobiles" of operating systems

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,877

    Default Re: Tar command has me stumped...

    A so called tar file can contain anything. You seem to have a certain idea about what your tar file should contain. But apparently it contains different. You could first check what it contains by doing
    Code:
    tar tzvf minidlna_1.0.22_src.tar.gz
    to get a list of the files archived there. And see if that corresponds with what you think (and ask yourself where that thinking is based upon, what to maker of the tar file told you?)
    Henk van Velden

  5. #5
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,131

    Default Re: Tar command has me stumped...

    Gnu tar is different to traditional tar in that it usefully defaults to stripping the leading "/" from paths. You can restore the absolute path behaviour with the -P option.
    e.g. "tar -xvPf minidlna.xxxxx"
    but check with the -tvPf option sbefore using -xvPf.

  6. #6

    Default Re: Tar command has me stumped...

    vwgiturbo77 wrote:
    > whatever reason, the forum control panel wouldn't let me change it,
    > saying that my password was incorrect (although I had just logged in
    > with that password).


    That's just a bug with the forum software, don't worry about it.

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Tar command has me stumped...

    On 2011-10-26 07:16, vwgtiturbo wrote:
    >
    > I'm embarrassed to even have to ask this, as I have been using Linux for
    > years, albeit not soley on the command line, as I am now...


    Use a text mode file browser, Midnight Commander: mc. Yes, it opens tar
    files, too.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  8. #8

    Default Re: Tar command has me stumped...

    DenverD wrote:
    > second: just unpacking a tarball should make only one directory


    That's not true. It can contain as many directories as you want.

    > that one would be neither /usr nor /etc, so what happens if you issue
    > this command from a user terminal:


    That's not true either. What has changed in modern tar is that it
    automatically prevents the use of absolute paths, to avoid accidental or
    deliberate corruption of systems.

    So if you put '/usr' into a tar file, it will unpack as just 'usr'. And
    that's exactly what has happened here, I would guess. Somebody's built
    the tar archive to contain (hopefully part of) /usr and /etc and so when
    unpacked, it creates two local directories called 'usr' and 'etc'.

    To the OP:

    Its best to do as Henk suggests and use the t operation of tar to see
    exactly what is in the tar file (BTW, no need for v option!) or else
    simply look at what has been unpacked into those usr and etc directories.

    You may be lucky and find that everything within those directories is
    put into 'local' subdirectories. But quite likely, since the person who
    created the tar file apparently doesn't understand the etiquette of
    preparing tar packages for linux systems, you'll find it is trying to
    add software directly to your /usr tree. That's a bad idea and you
    should put them somewhere else (/usr/local or /opt perhaps).

    But perhaps a better idea is to read the reviews at
    http://sourceforge.net/projects/minidlna/reviews/ where it says:

    "I have packaged this for Red Hat/CentOS/Fedora & SUSE and it is
    available in the openSUSE build service
    (http:/software.opensuse.org/search)"

    So perhaps look there instead of trying to install the tar file.

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Tar command has me stumped...

    On 2011-10-26 12:25, Dave Howorth wrote:
    > vwgiturbo77 wrote:
    >> whatever reason, the forum control panel wouldn't let me change it,
    >> saying that my password was incorrect (although I had just logged in
    >> with that password).

    >
    > That's just a bug with the forum software, don't worry about it.


    He has to worry. Now he has two accounts, one with the old, useless email,
    and one with the new. Now somebody has to manually remove one.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  10. #10

    Default Re: Tar command has me stumped...

    Carlos E. R. wrote:
    > On 2011-10-26 12:25, Dave Howorth wrote:
    >> vwgiturbo77 wrote:
    >>> whatever reason, the forum control panel wouldn't let me change it,
    >>> saying that my password was incorrect (although I had just logged in
    >>> with that password).

    >> That's just a bug with the forum software, don't worry about it.

    >
    > He has to worry. Now he has two accounts, one with the old, useless email,
    > and one with the new. Now somebody has to manually remove one.


    Well he doesn't have to worry. He has exactly one account that is useful
    to him and a second one that he can ignore.

    The admins may have to remove the extra account, if they care. But then
    it's a forum bug that caused the problem, so it seems fair that the
    consequences fall on them.

Page 1 of 2 12 LastLast

Posting Permissions

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