Self extracting .bin files
Hi, guys... This is my first post here, so um... HI!
Anyway, to the issue in hand: I recently installed RedHat 9 on my laptop. As far as it goes, it works absolutely perfectly. The problem is this: I'm trying to install things, and downloads keep coming up as "self extracting .bin files" on the site i download from (namely Sun Java). Well, i'm not that familiar with Linux, so i download the file and double click. The problem is this: All i get come up on the screen is text. It looks like a script of some kind, but the problem is that it dosnt do anything: It simply displays the text! Arg, can someone please help me with this problem - im trying desperately to install stuff (including the JaveRE files) but I can't!!! Thanks in advance |
Open a terminal.
Code:
chmod +x name_of_self_extracting.bin |
OK, the first line seemed to work fine... Then, when I put in the second line, I got this redurn:
Quote:
Thanks for the help so far, and thanks for any more help! Edit: Ah, I typed it wrong! All works fine, thanks very much for your help! |
lol, :) glad to hear you got it working.
the ./ is used to tell the shell to look in the current directory for the file. That way it would see it even if it wasn't in a place you would normally look for an executable file. |
Yeah, thanks again...
Just out of interest, where does it normally look then, if not in the current directory? (my only real experience with using command lines is when I used to use DOS to try to get past the security in school ;) ) |
Path
DOS and Windows first look in the current directory, then in the directories listed in the PATH variable. To see this, in a console window, enter the command:
echo $PATH *nix systems do not look in the current directory. This seems to be a "philosophical" thing. You shouldn't normally be in the program directories but somewhere in your home tree. |
It is more than just philosophical. It is security related. Remember that any file can be executable on *nix and that many common commands are programs and not build into the shell. If some malicious person put the following into a file named /home/eviluser/private/ls
Code:
#!/bin/sh You shouldn't even have ./ as the END of your path because if you mistype a command and there is a bad executable there, you don't want it to run. Keep the current directory out of your path. If you want to run your own private programs... add them to ~/bin and add that to your path... you can execute them from anywhere and since you are the only one who can put files there, you will know they are trusted. |
Good Point
I never considered the evil_user scenario. (Nor do I have ./ in my path!)
|
Cheers, guys... Help much appreciated.
|
All times are GMT -5. The time now is 03:22 PM. |