vim error “Cannot create backup file, (use ! to override)”

I saw the following error message today on one of our nagios servers
when i tried to save a file in vim.

Cannot create backup file, (use ! to override)

The uptime of this server was about 300 days.

I checked the amount of files in /tmp

nagios:~# ls /tmp | wc -l

i then tried to delete the files without any luck:

nagios:/tmp# rm cor*
-bash: /bin/rm: Argument list too long

The solution:

i created a small bash script (

for FILE in `ls`
rm $FILE

made it executable with

chmod +x

started the script

nagios:/tmp# ./

bye, bye:

nagios:/tmp# ls /tmp | wc -l

Time to restart nagios with
nagios:/tmp# /etc/init.d/nagios start
Starting nagios: done.