Thursday, May 17, 2018

macos - strange character in my $PATH var




I'm on mac os x 10.6 aka snow leopard and I seen when I do echo $PATH some strange characters are appended to it. My path looks like:




/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:รข\200\234\200\235




I've tried to see where it comes from but now I'm starting to question my Mac OS X knowledge more. I removed the export path stmts from ~/.bashrc and ~/.bash_profile.
logged out, logged in no change.
I moved the contents from `/etc/paths.d away. still same path. (exclude path_helper)
I commented out the contents of /etc/profile logged out restart computer, still same characters.




I'm getting a bit worried that something evil is residing on my machine, or am I overlooking something?



BTW there are 2 user accounts on my mac, and the other is normal.
Hope somebody can shine a light.


Answer



Paths are also read for apps launched from the Finder or desktop from ~/MacOSX/environment.plist.



I think /etc/paths is read only if ~/.bashrc is not there




To see hidden files from a Snow Leopard file open dialog hit Shift-Cmd-.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...