When I input a vi command, I often didn't finish the file name and edited a directory instead. Although I haven't saved the edit yet, it's very close for many times. It makes me very worried. So, I'm wondering what I can about it if I edited a directory accidentally. For example, if I run
Changed the file and saved it. I think I will lose access to all mysql data, is there an easy way to get the directory back?
Code:
#vi /var/db/mysql/