Small Problem


I am currently making a small php website on a server, I use the vi editor to edit some of files for small changes

However i notice that there are some php files which end with ~ sign i.e. index.php~

and when i try to open this file on the server.


it don’t work. So i know that the main file is still index.php but it makes confusion for others so i want to remove all files which are ending with ~

Is there a way which can be done so that i don’t have to do it manually every time and all these files ending with ~ gets removed.



rm -f *.*~

If you would like vim to stop creating backup files, read this:

Thanks Dan :),

Also just asking for knowledge. For this kind of thing, Can we solve this with .htaccess ??



These files are created by your text editor, changing a web server’s configuration files is not going to change your text editor.

Maybe my post was misunderstood. I conveyed two pieces of information to you:

  1. How to delete all of the backup files (ending in ~) that vim creates when you edit a file.

  2. How to change the vim settings so that these files are not created in the future.

Thanks again Dan, I understand your first reply as the two ways you told. the .htaccess question was for knowledge.

But your tips worked and which is great!!