To remove a file with dashes, slashes or other special characters, the easiest way is to access the file using its inode. To get the inode of a file, just do a ls -li. When you have that number, use find to delete the file using the following command:

find . -inum [inode] -exec rm -i {} \;

Solution 2

To remove a file whose name starts with a `-‘, for example `-foo', use one of these commands: