I sometimes type something bad or want to put a file back the way it was before I "improved' it.
I want to put an alias in .bashrc that would backup a file to /root/bk before I edit the file with VI.
the script should copy the named myfile to /root/bk/myfile.YearMonthDayHour and then open it with vi.
Software can not be installed for this, I would like It to be something I can use on any system.
This is for redhat Linux 5.0, vi and bash.