The Meaning of dot slash for Running an Executable in Linux
|
|
|
Comments (3)
Yeah, I think the ghist is that if you specify a relative path, then $PATH has no involvement.
Agreed, having '.' in your $PATH is a pretty bad idea, particularly so for root.
Agreed, having '.' in your $PATH is a pretty bad idea, particularly so for root.
smallboxadmin wrote: I thought $ ./filename was a relative path and not a absolute path.
Thanks for the comment - the path is certainly relative to the current directory. I've edited the article accordingly.
I've also included a warning to refrain from adding '.' to the PATH permanently.
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help
Sign up and post (it is free) or Log in and post

Correct me if I'm wrong but I thought
It would have been nice if the author would have mentioned the security implications of having your home directory as part of the PATH environment variable.