LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Help on executables.... (https://www.linuxquestions.org/questions/linux-general-1/help-on-executables-37459/)

Kit 12-05-2002 10:09 PM

Help on executables....
 
Newbie on the loose!! Brand new Linux user here- as of December 5th. (Whoohoo! Da Pengy is waaaaay better 'n' Microsith Windows!)
:newbie:
Anyway- to the question-
On RedHat Linux 8.0, After I've extracted a .tar file and doubled clicked the file and clicked on run nothing at all happened-
-so I clicked on display and noted nothing really messed up, (But how would I know?)
Then I clicked on run in terminal and the terminal prog opened and closed before anything could be seen- so messing with the prog I eventually got the gist of the error, (This particular .tar happened to be netscape- but all the other .tars have the same prob.) Here I was running the netscape-installer (With the little gear that I'm sure indicates the Windows equivalent of an .exe file) this is what was spelled out in the terminal:

/home/Kit/netscape-installer/netscape-installer: line 45: ./netscape-installer-bin: No such file or directory

Soooo...what am I screwing up on? I reinstalled the correct RPM (4.1 8.x) And nuffin' changed. Do I have to specify the path or something to the installer-bin? (And yes- I did follow the directions in the README file- but it's a universal, er, Computerversal problem.)

In short- help?
And anyone who wantsta gimme basic RedHatLinux 8.0 assistance- that AIM is Aeoryth.

DavidPhillips 12-05-2002 10:12 PM

open xterm

type

tar -xvf filename.tar

cd foldercreated


ls

find the name of the file to run if there is one

./filename

Kit 12-05-2002 10:18 PM

Right- would Terminal from System tools be xterm? And here's the screwy results:

[Kit@localhost Kit]$ tar -xvf netscape-installer.tar
tar: netscape-installer.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Do I include a path to the file? Nope- just tried that,

[Kit@localhost Kit]$ tar -xvf /home/Kit/netscape-installer/netscape-installer.tar
tar: /home/Kit/netscape-installer/netscape-installer.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

DavidPhillips 12-05-2002 10:43 PM

this means you are not typing the right path


cd /path to file

ls

tar -xvf filename.tar

Kit 12-05-2002 11:22 PM

Sweet- with a little boost from a friendly semi-Linux user and instructions from a site- I configure that ls helps a lot, cd means change directory and ./ is to execute somethin'. Ah well, in short.
I win!

DavidPhillips 12-05-2002 11:58 PM

yep

if you figure out what most of the commands in /bin do you should be ok

a good way to check out a command's options is

man command


like this


man ls

most commands will have something in the man pages

DavidPhillips 12-06-2002 12:00 AM

one more thing

./

means the current directory

so if the command is in the current directory it's the same as typing the full path, which is what's required to exec something... unless it's in your path variable

DavidPhillips 12-06-2002 12:17 AM

also this command

ls -l

is useful to see if something is able to be executed, and by who

[david@Firedragon david]$ ls -l /bin/tar
-rwxr-xr-x 2 root root 155560 Sep 10 06:10 /bin/tar

this says /bin/tar is owner is root, it's group is root.
it has 2 links
it's size is 155560 bytes
it was created Sep 10 at 6:10
and what's real important is it's permissions
-rwxr-xr-x

the first digit is -

this means a regular file

a link has l

a folder has d


the next three digits
rwx
are the permissions of the owner (root in this case)

r = read
w = write
x = execute

the next three

r-x
are permissions for the group ( also root )
members of the group have r and x but not w
read and execute, but not write

the last three are for world

r-x

so anyone can read and execute this file

sometimes a file will not be executable and it needs to be to install it

chmod 755 filename

will set the file to
-rwxr-xr-x

normally the netscape binary will require

chmod 755 netscape-installer-bin

then

./netscape-installer-bin

DavidPhillips 12-06-2002 12:23 AM

then do this

cd netscape-installer

./netscape-installer

Kit 12-06-2002 11:24 AM

Wow! Lots of info! Sweet!
Thanks much for putting in the time to explain all that to me, :) I've got it written down and all for future use- and hopefully I can upgrade from Hatchling newbie to a being who knows that they're doing.


All times are GMT -5. The time now is 02:22 AM.