Question

I have a file that keeps popping up in my git status log. It looks like it was created by accident, but when trying to use "rm name_of_file" I get the following error:

rm: cannot remove `name_of_file': No such file or directory

Here's the actual filename:

how
2d02b0b06030126e194e178ce2493a2de30144c7\033[1~q
Was it helpful?

Solution

Option 1:

Use escape characters.

rm -f "how\ 2d02b0b06030126e194e178ce2493a2de30144c7\\033[1~q"

Option 2:

Deleting through inum value

find . -inum | <operation>

OTHER TIPS

Have you tried using tab to autocomplete the file name? Alternatively, just use wildcards:

ls *how*
rm *how*
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top