remove from PATH

Hi, I was adding a directory to the PATH variable using export function, and the command completed before I finished typing. So now there’s a bogus element in PATH. I’ve looked for it in /etc/profile and ~/.bashrc. It doesn’t appear to be in either. Anyone know how to eliminate the entry from PATH?

Thanks for any replies!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Close the shell and create a new one? Open a new non-child shell and
view its PATH and copy it over?

Good luck.

Slipstream00 wrote:
| Hi, I was adding a directory to the PATH variable using export function,
| and the command completed before I finished typing. So now there’s a
| bogus element in PATH. I’ve looked for it in /etc/profile and
| ~/.bashrc. It doesn’t appear to be in either. Anyone know how to
| eliminate the entry from PATH?
|
| Thanks for any replies!
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIiSkX3s42bA80+9kRAtvsAKCH4C58wbCrjmSCOUJfoQ3R6zKhDgCcDUuM
Nqw1uGBiCSZRdNb3I5AAPY0=
=XNbn
-----END PGP SIGNATURE-----

Thanks, but it doesn’t seem to do it. I might not have understood your solution correctly, but I copied the desired path to a new root console after closing the old one.

The command I used was:

# export PATH='/usr/bin:opt/local/bin......'

No luck though. After reboot, the omitted elements were still present. :frowning: