I've accidentally overwritten my ~/.bash_profile file.
Does anyone have a "sample" one I could copy, or know where I might be able to find one?
|
|
Search for dot_files in Google or Github if you like a sample one. If you like to restore it, you could try to get it from your TimeMachine backup (if present) |
|||||
|
|
Unfortunately this is what revision control is for. There is no way to undo modifications, while deletes through finder are actually moves to the trash. Use TimeMachine in the future. Aside from this, it will also give you piece of mind when your current hard drive dies. I know people facing this problem now and if they only invested $30-$50 into a backup hdd, the problems would not happen. I recommend you just learn from this and back up using timemachine periodically. Github as mentioned by Ian C is a great place to back your dotfiles, also you can find dotfiles from others'. Version control to the rescue here, don't know how many times it saved me, but definitely more than I can remember. The advantage of TimeMachine is that it also does version control, problem is that its stored by snapshot time, not logical version. Good luck. |
|||
|
|
|
By default, hidden files cannot be seen in Time Machine or Finder. If you are trying to restore your file from a backup but can't see the To enable the display of hidden files type the following two commands into Terminal
Now perform your restore from your backup of your home directory. To make these files hidden again, type the following commands into Terminal
Note: Case is important in the commands above. |
|||
|
|