0

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.

IDDQD
  • 253
  • You can for sure restore all aliases, variables, options and functions separately, but I don't see possibility to restore .bashrc as a whole file. – jimmij Jul 28 '15 at 15:56

1 Answers1

0

You can try any of the following

    set
    alias
    typeset -f

or if you are using Bash 4 look at the builtin compgen

fd0
  • 1,449
  • Turns out that my IT department created snapshots of out home directories, so no losses were suffered. Nonetheless, thank you. – IDDQD Jul 28 '15 at 17:16