undoing changes to bashrc from terminal

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

Unfortunately I just overwrote my .bashrc with

echo \"command\" > ~/.bashrc

as opposed to append

5条回答
  •  暖寄归人
    2021-01-12 12:05

    Assuming you built your .bashrc with a bunch of similar echo commands and you just want to retrieve them:

    Is there a location where a session's commands are stored?

    If you run history, you should be able to retrieve the previous commands. For more information, see man history.

    In your case, you might find the output of history | grep bashrc useful.

提交回复
热议问题