Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: Bazoukas on 26 February 2002, 06:45

Title: Heeelp this Linux noob with tar files:(
Post by: Bazoukas on 26 February 2002, 06:45
People I realy want to get away from Windows.
I installed Red Hat few days ago (I had Mandrake before) and I am simply amazed.
 This is though I have trouble with the Tar file.

I type tar xvzf "filename"
then when i type ./configure its a no go :(


what I am doing wrong.
By the way i was trying to install a linux version of napster.

Help pls?
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 26 February 2002, 07:18
First of all I will assume that the source code you are trying to unarchive and compile has a configure script.  Normally in an archived and compressed file (*.tar.gz, *.tgz) there will be a recursed subdirectory included. Let's say you have an archive called "samba.tar.gz" and you extract it by doing a "tar -xvzf samba.tar.gz" it will likely create a subdirectory called "samba" where it will put all of the source.  In order for the "./configure" command to work you have to actually change into the directory where the "configure" script resides (that's what the "./" part of the command means. Run said program which resides in current directory).  So after unarchiving you would have to "cd samba" and then "./configure".  

Another way you can check is to do a "tar -tvzf samba.tar.gz | grep configure" which will just list the files in the archive containing the name "configure" but not actually extract them.  You will likely see one or more subdirectory names prepended to the configure script.  You'll need to change directory into the directory containing the configure script after extracting.  Hopefully I didn't confuse you.

[ February 25, 2002: Message edited by: VoidMain ]

Title: Heeelp this Linux noob with tar files:(
Post by: Almy on 27 February 2002, 02:34
Gotta ask...tried to wait!

 As a linux idiot, I know nothing at all. But this question gets close to some thing I'm looking for info on. Any suggestions on a good place to learn the basics of linux? By that I mean the file work in shells. I did a little lpc coding a few years back, but purely for fun.

 Anything I did had plenty of help within...I haven't been so fortunate with linux as yet. Basically I would like to find some good literature on-line or off-line that I can dig into. Keep in mind...I barely no what 'cd ..' does!

 Almy
Title: Heeelp this Linux noob with tar files:(
Post by: dbl221 on 27 February 2002, 03:36
Buy the bool "Running Linux" by O'Reilly

nuff said
Title: Heeelp this Linux noob with tar files:(
Post by: eXor on 27 February 2002, 06:11
silly question probably but, did you do tar xvzf or tar -xvzf? tar xfzv won't work.

I thought Redhat just used RPMs and didn't bother with tarballs.  I use Slackware myself as IMHO it provides the best flexibility/control and haven't tried the other distros.  Just curious.
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 27 February 2002, 21:15
quote:
Originally posted by eXor:
silly question probably but, did you do tar xvzf or tar -xvzf? tar xfzv won't work.

I thought Redhat just used RPMs and didn't bother with tarballs.  I use Slackware myself as IMHO it provides the best flexibility/control and haven't tried the other distros.  Just curious.



Huh?  When did slackware stop using GNU tar? With GNU tar the dash (-) is optional (it's not optional on all *NIX though, but it is with GNU tar which is what RedHat has used since the beginning).

And there isn't an RPM for everything, and if you want to keep up with the latest releases there may not be an RPM, depends on the developer or if anyone is ambitious enough to create an RPM.
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 27 February 2002, 21:24
quote:
Originally posted by Almy:
Gotta ask...tried to wait!

 As a linux idiot, I know nothing at all. But this question gets close to some thing I'm looking for info on. Any suggestions on a good place to learn the basics of linux? By that I mean the file work in shells. I did a little lpc coding a few years back, but purely for fun.

 Anything I did had plenty of help within...I haven't been so fortunate with linux as yet. Basically I would like to find some good literature on-line or off-line that I can dig into. Keep in mind...I barely no what 'cd ..' does!

 Almy



I tell you what I believe is the best way to learn Linux commands and how to script them is to learn shell programming (very easy to learn and very powerful).  Shell programming tutorials will be of GREAT help if you want to learn the Linux/UNIX command line.  You can do anything on the command line that can be done on a shell script. A shell script just allows you to tie builtin shell commands and external system commands into a script that can be easily automated. Shell scripts are much like *.BAT (COMMAND.COM shell script) and *.CMD (CMD.EXE shell scripts) files in DOS/CMD if you are familiar with MS.  The difference being shell scripts are 4096 times more powerful then MS scripts and easier because of it.

The "bash" shell (Bourne Again Shell) is the most prominent in Linux, however I also like "ksh" (Korn Shell).  Korn Shell has an advantage of built in math which makes looping and counting easier in your script.  You can install the PD-KSH (Public Domain Korn Shell) which usually comes with most Linux distros but may not be installed by default.  "ksh" is the "default" shell on a lot of commercial UNIX systems (the commercial version of ksh).

There are a lot of good tutorial sites on line.  I would suggest going to www.google.com (http://www.google.com) and searching for "bash shell programming tutorial".

I just did a quick search and found a page that looks like it has all the basics.  I have not read through any of it for quality but most of the stuff you should learn is on the index on this page:

http://www.freeos.com/guides/lsst/index.htm (http://www.freeos.com/guides/lsst/index.htm)

And here looks like a really good link:

http://www.1001tutorials.com/bash/index.shtml (http://www.1001tutorials.com/bash/index.shtml)

And this one:

http://www.linuxgazette.com/issue52/okopnik2.html (http://www.linuxgazette.com/issue52/okopnik2.html)

And here's the O'Reilly book on "bash":

http://www.oreilly.com/catalog/bash2/reviews.html (http://www.oreilly.com/catalog/bash2/reviews.html)

99% of the time you can't go wrong with O'Reilly books for *NIX.  They are by far the best.

[ February 27, 2002: Message edited by: VoidMain ]

Title: Heeelp this Linux noob with tar files:(
Post by: eXor on 27 February 2002, 16:51
VoidMain is quite right about the "-" being optional in "tar -xvzf".  My apologies.
 
I've never tried using switches without the leading "-" till today and didn't know they were optional. We learn something new every day  :D
Title: Heeelp this Linux noob with tar files:(
Post by: dbl221 on 1 March 2002, 21:20
KSH is by far the best shell......as far as tutorials I have found that having to write lots of code is the best way to learn shell programming.

The best shell programming book of all time is...........

"Hands-On KornShell93 Programming" by Barry Rosenberg.

I have a LOT of shell books and this one is A+ even if you are not using KSH it rocks.

????????I tried to built KSH93 from David Korns source code available at http://www.kornshell.com/. (http://www.kornshell.com/.)

Man this was not fun.....it doesn't use the traditional ./configure make, make install method.........it doesn't use normal make files.....if anyone gets this one built please post the results here.
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 1 March 2002, 12:47
Will that Korn shell do floating point math?  The PD-KSH does not, but some commercial Korn shells do.  I had to rewrite a Big Brother module in Perl for Linux because it was originally done in commercial Korn shell that was capable of floating point (not that a port to Perl is ever a bad thing).

[ March 01, 2002: Message edited by: VoidMain ]

Title: Heeelp this Linux noob with tar files:(
Post by: Bazoukas on 7 March 2002, 04:12
Hi there Voidman.
 Thank you for all of your help. I just saw your reply.

  Here is what I got so far.

AGsAGsatellite0520/AGsatellite-static
>>>>>>>>>>>>>>>>>>/German.txt
>>>>>>>>>>>>>>>>>>/license.text
>>>>>>>>>>>>>>>>>>/readme.txt

 The directory was created in :file:/home/userA"
I did the cd AGSatellite0520 and everything went well.

when i tried the ./configure command though  i got a "no such file or directory"
 I tried "AGSatellite0520./configure" and I got
AGSatellite0520 command not found

I tried the make  and make install commands just to try my luck but nothing.

  I opened the read me text of the AGS program and  it basically talks on how to create an account and how to create shared folders and so on. Nothing about installing that might be helpfull.


thank you mucho.
Title: Heeelp this Linux noob with tar files:(
Post by: dbl221 on 7 March 2002, 21:43
Hey VoidMain........Ok floating point math in ksh93..........checking............yep it does it......ksh93 is the same as ksh on commercial Unix.......well they could be ksh88 or whatever.

code sample from "Hands-On KornShell93 Programming"

#Declare variables
float x=5.8
float x=3.7
float z

((z = x + y))
print "$x plus $y is $z

((z = x * y))
print "$x times $y is $z"

#you get the idea.

ksh93 is very good........please let me know if you can figure out the odd way of builting ksh93 from http://www.kornshell.com/ (http://www.kornshell.com/)

I was unable to make it work since it does things its own way.
  (http://tongue.gif)
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 7 March 2002, 21:51
Outstanding! downloading now and will let you know.
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 7 March 2002, 10:06
dbl221, why go to the trouble of compiling? They have binary packages available. Here's the Linux i386 version:

http://www.research.att.com/~gsf/download/tgz/ast-ksh.2001-10-31.linux.i386.tgz (http://www.research.att.com/~gsf/download/tgz/ast-ksh.2001-10-31.linux.i386.tgz)

Took all of 10 seconds to download and test and it does floating point just the way I like it!  (http://smile.gif)   Thanks buddy!
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 7 March 2002, 10:11
quote:
Originally posted by bazoukas:
Hi there Voidman.
when i tried the ./configure command though  i got a "no such file or directory"
 I tried "AGSatellite0520./configure" and I got
AGSatellite0520 command not found

I tried the make  and make install commands just to try my luck but nothing.

  I opened the read me text of the AGS program and  it basically talks on how to create an account and how to create shared folders and so on. Nothing about installing that might be helpfull.


thank you mucho.



Are you sure you have the source and not a binary package all ready to run?  Could you point me to the place you downloaded it and what the file name is and I will examine it and try and give you instructions (if I am successful with it)?

Thanks,
Todd
Title: Heeelp this Linux noob with tar files:(
Post by: Bazoukas on 8 March 2002, 06:20
Audiogalaxy static version at cnet (http://download.cnet.com/downloads/1,10150,0- 1004- 103-0-1-7,00.html?tag=srch&qt=audiogalaxy&cn=&ca=10004)


 I downloaded the second one.


By the way thank you for your help...its not as if i
REALY need to get this program, i am just trying to learn how to untar tar files.
  This am sure looks like stupid to you :-D
Title: Heeelp this Linux noob with tar files:(
Post by: Bazoukas on 8 March 2002, 06:49
[L=null]http://download.cnet.com/downloads/1,10150,0- 1004- 103-0-1-7,00.html?tag=srch&qt=audiogalaxy&cn=&ca=10004]Audiogalaxy static version at cnet[/L]

i dont if this will work. same link tried to fix my mistake
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 8 March 2002, 21:50
I think that is a binary package (I did not download it, but the "static" in it's name indicates it is already compiled and statically linked).  This means there is likely no "configure" script included.  You need the source code for that.  Download the source using this link:

http://www.geocities.com/uallloveme/OSS/AGBrowser/agbrowser-0.96.html (http://www.geocities.com/uallloveme/OSS/AGBrowser/agbrowser-0.96.html)

The open up a shell prompt and change into the directory you downloaded the file to and type (without the $ signs):

$ tar -xvzf agbrowser-0.96.tar.gz
$ cd agbrowser-0.96
$ ./configure
$ make
$ su

Then enter your "root" password and type (without the # sign):
# make install

If you got no errors during the make and install process like I didn't then you should be able to exit from your root shell (type "exit").  Then type "agbrowser" to run the program.

Hope this helps. If you are running RedHat 7.2 and have the compiler installed correctly you shouldn't have a problem. And if you want to read the "how to compile this program instruction page" (which I didn't because it worked as I expect any source package to work) it is here:

http://www.geocities.com/uallloveme/OSS/AGBrowser/build-howto.html (http://www.geocities.com/uallloveme/OSS/AGBrowser/build-howto.html)
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 8 March 2002, 10:06
Whoops, did some more research and realized that is not the same program.  You wanted AGSatellite0520.  Here is another place to download it:

http://www.audiogalaxy.com/ (http://www.audiogalaxy.com/) but it sounds like you have already downloaded it.  If your copy is bad then get this one:

http://www.audiogalaxy.com/downloads/AGSatellite0520-static.tar.gz (http://www.audiogalaxy.com/downloads/AGSatellite0520-static.tar.gz)

It is *not* source code but contains the executable.  So you would open a shell and change into the directory you downloaded and:

$ tar -xvzf AGSatellite0520-static.tar.gz
$ cd AGSatellite0520
$ mv AGSatellite0520-static AGSatellite
$ ./AGSatellite

Couple of notes.  If you notice there are upper and lower case characters in the above instructions.  This is important.  Also I found that "AGSatellite" does not run because you need to create a "shares.txt" and "account.txt" files.  Hopefully you can take it from here as I don't know what AGSatellite is or does.  Look through the FAQ on the web site and hopefully you can find the answers to make it run. Good luck

[ March 08, 2002: Message edited by: VoidMain ]

Title: Heeelp this Linux noob with tar files:(
Post by: Calum on 8 March 2002, 13:37
AGSatellite is one of those file sharing utilities that we heard about so much in the news last year, with it's own specific file sharing network setup.

I am a little embarrassed to admit it, but i am totally out at sea with installing from tar files, what with tarred executables and tarred source, .tgz files and what have you.
Can somebody place a link to a properly definitive guide to the myriad ins and outs of installation from tarballs?
i haven't really looked myself yet, and am about to, will post any good sites i find, but i ask just in case anybody has come across a good site recently in their own travels...

Thanks, all!
Title: Heeelp this Linux noob with tar files:(
Post by: jtpenrod on 8 March 2002, 14:08
quote:
I am a little embarrassed to admit it, but i am totally out at sea with installing from tar files, what with tarred executables and tarred source, .tgz files and what have you.


It ain't so hard. Once you download one, check out the extension. This will be:

*.tar.gz - This indicates a tar archive that's been compressed with gzip. Sometimes this will be shortened to: *.tgz

In that case use: tar xvzf WhatEver.tgz
Or: tar xvzf WhatEver.tar.gz

A .bz2 extension means that bzip2 was used. For these, the command is: tar xvjf WhatEver.tar.bz2

This will undo the compression and extract the archive. What I do is I've created a special directory called Install-Programs in my home directory just for this purpose. That's where I drop the "tarball" and unload it. Once you've done that, cd to your install directory. Since I keep this a clean directory, I know where everything is. If the writers of the tarball did any sort of decent job, there should be a couple of files called "README" and "INSTALL" (all caps). These contain the instructions on how you should proceed, whether you need to run something like:
./configure (Note: Unless the install directory is in your path, you need to use the ./ in order for BASH to find it. If you just try "configure", you'll probably get a "bad command" or "command not found" error.) Sometimes you can just type in "make" at the command prompt in order to compile the executable. make is really quite a versatile program that can also do the install, and perform any post-install clean up that may be required. Once you've verified that everything is working OK, you should remove any left over files from the install directory (keep it clean). Some can be discarded, but I'd keep the original tar archive and store it somewhere else. You never know when you might need it again.

Naturally, this may seem strange if you are coming from Winders. It really isn't so bad. The best thing to do is go ahead and give it a try. No better teacher than experience.
Title: Heeelp this Linux noob with tar files:(
Post by: voidmain on 9 March 2002, 05:33
And for those newbies who are confused when they can't run a program that resides in their current directory just by typing it's name, you *can* make it so you do not have to type the "./" to run the program.  Just add "." to your PATH in your ~/.bashrc.  Then when you change into a directory that has an executable it will be in your path as "." is the "current working directory".  Now, this is turned off for a reason.  It is a security risk for trojans if "." is in your path (if you have more than one user that uses your system). And since UNIX thinks about security first they do not add "." to your path.  If you need me to explain how this can be a security risk I can do that in a later post.  But if you wanted to add it just edit your ~/.bashrc file and add this:

PATH=$PATH:.
export PATH