This question already has an answer here:
I have a bit of a situation. One of my co-workers just overwrote everyone's bashrc and bash_profile files. My custom settings have been lost. However, I still have a terminal open which sourced my own bash settings, before they got overwritten. Is there any way to extract the commands that got sourced at startup from an existing terminal? Thank you.