On Sat, 04 Feb 2017 09:19:38 -0600, Wildman wrote: > On Sat, 04 Feb 2017 11:27:01 +0200, Jussi Piitulainen wrote: > >> Wildman writes: >> >> [snip] >> >>> If anyone is interested the correct way is to add this to /etc/profile >>> (at the bottom): >>> >>> PATH=$PATH:./ >>> export PATH >> >> Out of interest, can you think of a corresponding way that a mere user >> can remove the dot from their $PATH after some presumably well-meaning >> system administrator has put it there? >> >> Is there any simple shell command for it? One that works whether the >> dot is at the start, in the middle, or at the end, and with or without >> the slash, and whether it's there more than once or not at all. >> >> And I'd like it to be as short and simple as PATH="$PATH:.", please. > > No, I do not know. You might try your question in a linux specific > group. Personally I don't understand the danger in having the dot in > the path. The './' > only means the current directory. DOS and Windows has searched the > current directory since their beginning. Is that also dangerous?
one example of how it can be dangerous is if you accidentally download a program into your current directory with a name that matches a system command, it will get executed instead of the system command. this can be exploited by the nefarious to install a trojan, virus or other nasty. coupled with the average windows user's insistence in running with admin rights & clicking anything is sight is one of the reasons that windows has so much malware -- QOTD: "You want me to put *holes* in my ears and hang things from them? How... tribal." -- https://mail.python.org/mailman/listinfo/python-list