Unfortunately I just overwrote my .bashrc
with
echo \"command\" > ~/.bashrc
as opposed to append
You can't completely recover. But you can partially recover using set
.
If you run set
on the same terminal you'll be able to get a whole list of custom scripts and other environment variables set. And in that, it's upto to differentiate the ones that were part of .bashrc
and others typed on that terminal. But you won't be able to recover the commands which used to be executed as part of bash login.