Linux – delete or rename a file with \r as the file name

bashfilesystemslinux

I have a pesky little file whose name appears to be single character, and that character is a \r

How can I delete this?

This is what I get with ls -bl:

-rw-rwxr--+   1 root             snapplewriters        0 Aug 29  2011 \r

ls -l just display it "?"

Best Answer

Us ls -li to get the inode number for the file (first column), then use find to delete it (assuming inode is 12345):

find . -inum 12345 -exec rm -i {} \;

Related Question