Wrong information?

Story: The Meaning of dot slash for Running an Executable in LinuxTotal Replies: 2
Author Content
smallboxadmin

Jan 19, 2012
12:43 PM EDT
Quoting:If you prefix the dot and the slash, the absolute path is passed to the shell...


Correct me if I'm wrong but I thought
$ ./filename 
was a relative path and not a absolute path.

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.
skelband

Jan 19, 2012
12:53 PM EDT
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.
abdullah

Jan 19, 2012
3:06 PM EDT
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.

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!