LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux questions and ANSWERS PLEASE! (https://www.linuxquestions.org/questions/linux-newbie-8/linux-questions-and-answers-please-820904/)

msbernice 07-20-2010 12:49 AM

linux questions and ANSWERS PLEASE!
 
Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?

Tinkster 07-20-2010 12:59 AM

Smacks of homework ... did you read the accompanying course
material? What steps did you take (other than asking others)
to come up with a solution?



Cheers,
Tink

animeman 07-20-2010 01:07 AM

PATH is a variable that tells your shell which directories to search for your programs from your commands that you have typed in and if you delete it then you will have quite a headache..

leopoldb 07-20-2010 01:17 AM

How about re-install?
 
Quote:

Originally Posted by msbernice (Post 4039038)
Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?

:) Hello,
My first thought is re-install. Save your data and re-install your system.

//Leopold

Tinkster 07-20-2010 01:20 AM

Quote:

Originally Posted by leopoldb (Post 4039071)
:) Hello,
My first thought is re-install. Save your data and re-install your system.

//Leopold

While this is mildly entertaining it's not really
in the spirit of LQ to mock people asking for help...


Cheers,
Tink

catkin 07-20-2010 04:36 AM

Quote:

Originally Posted by msbernice (Post 4039038)
Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?

Weird homework question because you can't delete a variable; you can unset it and you can set it to a null value but you can't delete it.

leopoldb 07-20-2010 05:07 AM

Clearing out a misunderstand
 
Quote:

Originally Posted by Tinkster (Post 4039076)
While this is mildly entertaining it's not really
in the spirit of LQ to mock people asking for help...


Cheers,
Tink

:hattip:Hello Tink,

I am sorry that you misunderstand my intention. I had no intention of mocking the person whom is seeking help here. I was helping as I would do if I would to come up with the same problem.

As the question was, it was a one time problem with, in my mind, the easiest solution is re-installing the system. I have done so many times when I think I missed something in my system. Searching for a solution is time consuming and re-install is easy and pretty much self-going.

//Leopold

BirdRacer 07-20-2010 09:19 AM

Umm....why not set the variable back to something reasonable like:

Code:

PATH=/usr/bin:/usr/sbin:/usr/local/bin:/bin ; export PATH
Then, as issues arise such as getting messages like "command not found", then find the path to that particular command and add it to the $PATH with :

Code:

PATH=$PATH:/path/to/new/command ; export PATH
You will need to add this to your .bash_profile or /etc/profile, and edit it each time you make changes to make it permanent.

Wim Sturkenboom 07-20-2010 09:40 AM

@leopoldb
Although I haven't tried it, to my knowledge a reboot should do the trick to get it back. It should be my option before re-installing ;)

jlinkels 07-20-2010 09:50 AM

Quote:

Originally Posted by Tinkster (Post 4039076)
While this is mildly entertaining it's not really
in the spirit of LQ to mock people asking for help...

Some thoughts on this.

This is clearly a homework question.
The OP did not even rephrase the question, it is copied verbatim from the text book.
The title of the thread is badly chosen, not related to the question.
The OP DEMANDS an answer: linux questions and ANSWERS PLEASE!

I think with all this shown disrespect for LQ and its members, the answer by leopoldb was midly entertaining and completely justified. Don't forget that the OP does not really have this problem, it is a text book question, and I doubt whether the OP has ever be close to a Linux machine.

Sorry for being pedantic :(

jlinkels

HasC 07-20-2010 10:26 AM

Quote:

Originally Posted by jlinkels (Post 4039529)
Some thoughts on this.

This is clearly a homework question.
The OP did not even rephrase the question, it is copied verbatim from the text book.
The title of the thread is badly chosen, not related to the question.
The OP DEMANDS an answer: linux questions and ANSWERS PLEASE!

I think with all this shown disrespect for LQ and its members, the answer by leopoldb was midly entertaining and completely justified. Don't forget that the OP does not really have this problem, it is a text book question, and I doubt whether the OP has ever be close to a Linux machine.

Sorry for being pedantic :(

jlinkels

completely true.

and I believe this thread should be closed, and the OP warned about not posting homework questions - at least, without making its own studying first.

unSpawn 07-20-2010 10:46 AM

Quote:

Originally Posted by jlinkels (Post 4039529)
the answer by leopoldb was midly entertaining and completely justified.

Entertaining yes, completely justified no. While posts in this thread are read in context right now it might also be read later on by others and a novice might take that misinformation seriously. While all are responsible for their own actions that doesn't mean 'rm -f' and equivalent jokes do LQ or GNU/Linux users in general any good.

unSpawn 07-20-2010 10:47 AM

Quote:

Originally Posted by leopoldb (Post 4039277)
I was helping as I would do if I would to come up with the same problem.

Then I strongly suggest you use GNU/Linux a lot more before giving any "advice".

leopoldb 07-20-2010 01:13 PM

I stand corrected
 
Quote:

Originally Posted by Wim Sturkenboom (Post 4039513)
@leopoldb
Although I haven't tried it, to my knowledge a reboot should do the trick to get it back. It should be my option before re-installing ;)

:hattip:Hello Wim S.,
Yes, of course. I assumed that OP had tried that before he post here. But you are right and I stand corrected.

Remember all newbie out there, if a problem comes along, reboot your system! :)

//Leopold

leopoldb 07-20-2010 01:19 PM

I do not understand
 
Quote:

Originally Posted by unSpawn (Post 4039580)
Then I strongly suggest you use GNU/Linux a lot more before giving any "advice".

:hattip:Hello unSpawn,

I do not understand what you mean:redface:. Can you please elaborate what you mean?

//Leopold


All times are GMT -5. The time now is 07:39 PM.