LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Accidental overwrite of .bashrc with different script. (https://www.linuxquestions.org/questions/ubuntu-63/accidental-overwrite-of-bashrc-with-different-script-858237/)

AceOfSpade 01-23-2011 11:08 PM

Accidental overwrite of .bashrc with different script.
 
Hey, so I have been working on this script and I just made a ridiculous error. I tried to move my script out of my home directory and for some reason I put in "mv myscript .bashrc" Now my .bashrc file has nothing but my script in there... I think I may have overwritten some important info. How do I fix this? Is running cp /root/.bashrc ~ Enough?

RockDoctor 01-24-2011 05:53 AM

If it wasn't customized,
Code:

cp /etc/skel/.bashrc $HOME
.

Kenny_Strawn 01-24-2011 09:28 AM

There is a file called /etc/bash.bashrc that you can use to restore the user bashrc file. No, it is not /etc/skel/bashrc in Ubuntu; that's for other distros.

This will restore your bashrc back to where it was. Log into a standard user account and type:

Code:

sudo cp /etc/bash.bashrc /root
This assumes you disrupted the root bashrc, which seems like so seeing as though it's /root/.bashrc.


All times are GMT -5. The time now is 05:59 PM.