You can backup your config files before editing them, like this:

cp configbeingedited.conf configbeingedited.conf__orig_datestring

This way, when things break or don’t function how you like, you can easily copy the original config file back into position, restoring the original functionality.

  • Andy
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Some Zsh:

    bak () {
      emulate -L zsh
      for 1 {
        cp -i $1 $1.bak
        ls -l $1 $1.bak
      }
    }
    
    • ace_garp@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      This is a clean way to make your own new command called ‘bak’, to automate making a second copy of the file.