Click to See Complete Forum and Search --> : ./filename ??
Ricardo Diaz
05-05-2001, 07:49 PM
I going through something i don't understand. I am in a directory that has a file I want to execute. Its called "configure". Its there in fron of my eyes. When I type "./configure" I get a "Directory or File does not exist" error. Why?? I have done this many times before but this one does not want to acknowledge itself and execute. Can someone please help and point me in the right direction, Fell free to IM me via ICQ #51698731" Thanks in advance. :confused:
The Whizzard
05-05-2001, 07:58 PM
You may need to be logged-in as root, if you aren't already.
Ricardo Diaz
05-05-2001, 08:09 PM
I am logged in as root. I tried it in kDE as well as in text mode. I can copy the file, i can open it in an editor. But when I do this "./" it says its not there.. Ive been stuck on this since last night.
The Whizzard
05-05-2001, 08:20 PM
Have you tried it without the './'? I don't remember what './' does, but think executes a script. I've changed some file that required the './' to executable and was able to run them without the './'. Maybe you've done the same without knowing?
Ricardo Diaz
05-05-2001, 08:23 PM
Yes I have, i'm starting to wonder if it has to do with the fact that i copied the file into the drive from a CDROM.
The Whizzard
05-05-2001, 09:23 PM
I guess it's possible that the file attributes weren't preserved when copied. Is there a INSTALL or README file? It may provide some information to the problem.
Bo Peep
05-06-2001, 10:42 AM
Are you sure that the file has execute permissions? Try making it executable: chmod 755 configure and then try again ./configure and see if that was any help.
[ 06 May 2001: Message edited by: Bo Peep ]
TaeShadow
05-06-2001, 10:59 AM
Just for the record, ./ allows you to refer to files in the current directory. It is required for security reasons.
If you would not like to type ./, you can put . (the current directory) in your $PATH, but that is not safe. It is possible that a malicious person has put a file in the current directory that could cause harm. For instance, I could create a program that deletes all of your files, name it "ls," and put it in your home directory. Then, when you typed "ls" in your home directory...
To prevent this, you must type "./ls" to execute my program. If you simply type "ls," it would execute the ls program in your $PATH, probably /bin/ls, or something like that.
That said, keep in mind that most distros include . in the $PATH of regular users, but not in the $PATH of root. This is a balance of convienience and security. If you would really like to be safe, remove it.
Ricardo Diaz
05-07-2001, 02:51 PM
Thanks Guys for all your help. I did manage to get around this. It seems that the file might have been currupted or something in the process of copying it to a CD from my Windows machine and then copying to the Linux Box. Even though they were visible they were not accesible. I downloaded the files again only this time i copied them to a floppy in its zipped format. After i copied the files to the drive on the lunix box then unzipped, I was able to execute them, It weird but thats what happened. Thanks anyway.
Strike
05-07-2001, 05:51 PM
Is it executable? chmod +x filename
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.