To remove a file whose name starts with a -‘, for example -foo’, use one of these commands: rm -- -foo rm ./-foo