[svlug] TCL/TK install on RH 9.0 (Was re: no subject)

Bill Kendrick nbs at sonic.net
Fri Jul 4 16:49:53 PDT 2003


[ Barf!  Forgot to [L]ist reply; sorry if this is mis-threaded :^( ]


Hi Sameer... I added a Subject to your message.  It's a useful thing to
do, both for people reading the list 'realtime' (e.g., they are subscribed),
as well as for those browsing the list via the archives (indeed; they may
be coming from somewhere distant like a Google search))

Anyway...


On Fri, Jul 04, 2003 at 10:38:21PM +0100, sameer kumar wrote:
> hi
> 
> im having redhat9.0. im trying to install a TCL/TK
> package which is inthe form of cd. but wheni m trying
> to unzip the contents in the cd its not unzipping. let
> m eknow wat to do.

Can you be a little more elaborate?  "Its not unzipping" doesn't say much,
because it could be for quite a number of different reasons.

First off, is it a "ZIP"-file proper? (e.g., a PKZIP file "something.zip"?)
Or by "zip" did you mean a "GZIP"-file, like is typically used in Unix/Linux?

What command were you running to try to unzip it, and what error were you
getting?


If you did something like:

  cd /mnt/cdrom/
  gunzip THE_TCL_FILE.gz   [ or tar -xzf THE_TCL_ARCHIVE.tar.gz, or whatever ]

it would certainly refuse to do it, since you're in the CDROM's directory,
and CDROMs are read-only!  :^)

You would want to do something like:

  cd /mnt/cdrom
  cp THE_TCL_FILE.gz /tmp/
  cd /tmp/
  gunzip THE_TCL_FILE.gz   [ or whatever ]


Or perhaps:

  cd $HOME
  cp /mnt/cdrom/THE_TCL_FILE.gz .    [ copy it to your homedir ]
  gunzip THE_TCL_FILE.gz


If it's a tar archive, you can just do:

  cd $HOME
                                                  [ no copying necessary ]
  tar -xzf /mnt/cdrom/THE_TCL_ARCHIVE.tar.gz

and you will have the un-gzipped and un-tarred archive in your homedir.


BEWARE:  When dealing with PKZIP files ("archive.zip") and
TAR archives ("archive.tar.gz", "archive.tar", "archive.tgz",
"archive.tar.bz2", et cetera), sometimes people do not put a main
subdirectory in the archive!


In other words, _most_ sane people do something like this to create a
tar archive:

  tar -czf FILES.tar.gz DIRECTORY

so when you "tar -xzf FILES.tar.gz", it creates a directory ("DIRECTORY"),
and puts all of the files in there.  The internal structure of the archive
looks like:

  DIRECTORY
  DIRECTORY/FILE1
  DIRECTORY/FILE2
  DIRECTORY/FILE3
  ...


However, if they just did something like this:

  cd DIRECTORY
  tar -czf FILES.tar.gz *

and therefore the structure of the archive ends up looking like:

  FILE1
  FILE2
  FILE3
  ...


...Which means if you untar this in your homedirectory, it will splat out
all of the files into your homedir (possibly overwriting any files with the
same name!!!), which can be irritating.  You have to "damage control"
afterwards to clean it up.  e.g.:

  cd $HOME
  tar -xzf INSANE_ARCHIVE.tar.gz
  ls -l                            [ see what's in your homedir ]
                                   [ think to yourself "aww CRAP! damnit!" ]
  mkdir DIRECTORY
  mv FILE1 FILE2 FILE3 .... DIRECTORY/
                                   [ hope you got them all and nothing got
                                     overwritten ;^) ]



So, as a rule of thumb, I normally do this before untar'ing (or unZIPing)
anything:

  cd $HOME
  tar -tzf POSSIBLY_INSANE_ARCHIVE.tar.gz   [ notice "t"=Table option,
                                              rather than "x"=eXtract ]
  [ it will spit out a list of what's in the archive ]


If the archive is sane (e.g., comes with its own subdir), I'll just
open the archive with "tar -xzf" and be on my way.


If it does NOT have a subdir, I'll make one, and then open it:

  mkdir SUBDIR_FOR_ARCHIVE
  cd SUBDIR_FOR_ARCHIVE/
  tar -xzf ../INSANE_ARCHIVE.tar.gz


(Note: For ZIP files, the option to "zip" for Linux is "-v" for "view":
  "unzip -v ARCHIVE_TO_EXAMINE.zip")



Anyway .. not sure whether any of this helped answer your actual issue,
but then again, you didn't give much to go on. ;^)  I hope someone somewhere
found SOME of this useful! ;^)


Good luck!

-bilL!

-- 
bill at newbreedsoftware.com                           Got kids?  Get Tux Paint! 
http://newbreedsoftware.com/bill/       http://newbreedsoftware.com/tuxpaint/




More information about the svlug mailing list