(Last Updated On: May 25, 2018)

I have heard many people complain about having a file with the name “@!” on Linux systems, mostly those using vim as their text editor of choice.

On doing some research about the same issue, I could narrow it down to a user problem, probably typing wrong commands when editing files using Vim. This is often as a result of Keyboard layout is different than the default US keyboard layout, causing mistyping of characters.

Editing files with Vim

When making changes to a file with vim, we usually do a save and exit, which in vim is done using the keys:

:wq

or

:wq!

If you press wrong keys, you’ll probably end up doing a different action. For example, if you type:

:[email protected]!

The file will be saved, but with another file with the name @! created. You can try this out and see.

$ mkdir /tmp/test
$ vim file1

Hello World

Save using:

:[email protected]!

Check directory content:

$ ls 
'@!' file1

$ cat file1 
Hello world

$ cat @!
Hello world

You can easily delete this file using rm command.

$ rm @!

I hope guys this was helpful. Just be careful next time when saving content on vim. Instead of using :wq, you can use:

ZZ

This means you exit from edit mode and pressing:

Shift +zz