Sunday, February 3, 2019

macos - need help cleaning out my Path Variable in Mac

when I typed $PATH i noticed a jungle


-bash: /Users/patrick/.rvm/gems/ruby-1.9.3-p194@Rails/bin:/Users/patrick/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/patrick/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/patrick/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/patrick/.rvm/gems/ruby-1.9.3-p194@Rails/bin:/Users/patrick/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/patrick/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/patrick/.rvm/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin: No such file or directory


how should I go about cleaning this as it seems to be everywhere


update:
I added this function in .bash_profile, so it's more readable


function path(){
old=$IFS
IFS=:
printf "%s\n" $PATH
IFS=$old
}


  • /Users/patrick/.rvm/gems/ruby-1.9.3-p194@Rails/bin

  • /Users/patrick/.rvm/gems/ruby-1.9.3-p194@global/bin

  • /Users/patrick/.rvm/rubies/ruby-1.9.3-p194/bin

  • /Users/patrick/.rvm/bin

  • /usr/bin

  • /bin

  • /usr/sbin

  • /sbin

  • /usr/local/bin

  • /usr/X11/bin

  • /Users/patrick/.rvm/gems/ruby-1.9.3-p194@Rails/bin

  • /Users/patrick/.rvm/gems/ruby-1.9.3-p194@global/bin

  • /Users/patrick/.rvm/rubies/ruby-1.9.3-p194/bin

  • /Users/patrick/.rvm/bin

  • /opt/sm/bin

  • /opt/sm/pkg/active/bin

  • /opt/sm/pkg/active/sbin

  • /opt/sm/bin

  • /opt/sm/pkg/active/bin

  • /opt/sm/pkg/active/sbin


I guess I have some duplicates due to rvm and jewelrybox.

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