Erased .bashrc with a faulty pipe

Yesterday was shit, I were gonna insert a streamripper command into my .bashrc so I could put it at the right place in the config later. The problem was that i typed
echo streamripper -to never -d ~/Music/hardstyle > ~/.bashrc
instead of
echo streamripper -to never -d ~/Music/hardstyle >> ~/.bashrc
That resulted in that instead of adding that row to the end of the file, it replaced the whole file with that single line! That messed up everything for a second, but luckily i had an old backup of my .bashrc created by nano that contained the most important things, my PS1 and the majority of my aliases.
I gotta sit down and rewrite everything that’s lost now :(


  1. Hunner says:

    git init, add .bashrc and other config files, and push to github. I got tired of syncronizing my configs between ~15 homedirs with an awkward script and now I just git pull.

  2. Crouse says:

    I just use RCS, or my bu alias that …. backups up whatever I tell it to. bu .bashrc would push a copy to ~/Backups/.bashrc-1214200-1234
    I put my bashrc under rcs control, but occasionally just do a bu in order to have a “saved state, at a point in time”

  3. hatten says:

    Right now I’m backing up things with an ugly ssh-mount alias. I’ll have a look at rsync and sync with server and netbook someday.