Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to remove path that used to be created.. help pls 1

Status
Not open for further replies.

hendnov

Technical User
Feb 27, 2006
73
AU
Hi guys,

Can you help me to remove the path that I used to create ?

I used to create path by using this command :
PATH=$PATH:/opt/java
export PATH

and now that directory has been deleted.
If I check echo $PATH, the path is still there.

Do you guys have any idea how to remove the one path?

Thx guys
 
It doesn't particularly matter, but just edit your path in .profile or /etc/profile (or elsewhere if not ksh) and login again to pick up the new $PATH.
 
Or if you need to do it on-the-fly for some reason:

[tt]PATH=`echo $PATH | sed 's#/opt/java##g;s#::#:#g'`[/tt]

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top