undoing changes to bashrc from terminal

后端 未结 5 1426
半阙折子戏
半阙折子戏 2021-01-12 11:03

Unfortunately I just overwrote my .bashrc with

echo \"command\" > ~/.bashrc

as opposed to append

5条回答
  •  时光说笑
    2021-01-12 12:08

    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.

提交回复
热议问题