LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [ubuntu] how to run files? (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bubuntu%5D-how-to-run-files-366048/)

shokora 09-22-2005 03:48 PM

[ubuntu] how to run files?
 
I downloaded the battlefield 2 server software but i dont know how to run it, ive tried this:

Quote:

headhunter@headhunter:~$ sudo ./home/headhunter/ati-driver-installer-8.16.20-i386.run
sudo: ./home/headhunter/ati-driver-installer-8.16.20-i386.run: command not foundheadhunter@headhunter:~$
but as you can see, that doesnt really work :(

can somebody please help me?

acid_kewpie 09-22-2005 04:05 PM

"./home/whatever" means that you're running a RELATIVE path, i.e. the . means "from here". so if you are in say /home/dave and you run it, you're actually telling it to run /home/dave/home/whatever which you can see is clearly wrong. this is a great time to tell you about tab completion too... if you start typing a filename nad hit tab it will fill it in for you, or give you all possible completions. in this case you'd have seen that there was no possible completion as the file would not have existed therem and you'd have been saved typing all that junk out manually.

so basically... just drop the "."

shokora 09-22-2005 04:09 PM

Quote:

headhunter@headhunter:~$ sudo /home/headhunter/ati-driver-installer-8.16.20-i386.run
sudo: /home/headhunter/ati-driver-installer-8.16.20-i386.run: command not found
same thing

jrdioko 09-22-2005 06:01 PM

Are you sure that's where the file is? Post the output of

Code:

ls -l /home/headhunter

acid_kewpie 09-23-2005 02:51 AM

like i said, use tab completion, you can easily fit a typo in there.... and if you can't find it, it's not there... simple as that.

scuzzman 09-23-2005 03:11 AM

Also, make sure it's executable.
Code:

chmod 755 /path/to/file/you/want/to/run

teebones 09-23-2005 03:20 AM

besides the 755 rights on this file.. i would in general advise to use the ~ sign.

~ = home dir for the user you are now.

so your command should be:

sudo ~/ati-driver-installer-8.16.20-i386.run

(if that is the name of the file..)

or you could do (as suggested here) tab (the key on the keyboard not the word) completion:

sudo ~/ati-driver [tab]

it will show the right name of the file... then press the enter key to use it.

shokora 09-23-2005 05:14 PM

thank you all very much for helping me :)
it worked now


All times are GMT -5. The time now is 10:54 AM.