I'm trying to rm
a directory and its contents, however for whatever reason rm
is ignoring escape characters.
In this example, I'm trying to remove the folder Team Fortress 2
from ~/.local/share/Steam/SteamApps/common
:
[redacted@host common]$ rm -r Team\ Fortress\ 2/
/usr/bin/rm: cannot remove ‘Team’: No such file or directory
/usr/bin/rm: cannot remove ‘Fortress’: No such file or directory
/usr/bin/rm: cannot remove ‘2/’: No such file or directory
I've also tried wrapping the directory name in quotes:
[redacted@host common]$ rm -r 'Team\ Fortress\ 2/'
/usr/bin/rm: cannot remove ‘Team\\’: No such file or directory
/usr/bin/rm: cannot remove ‘Fortress\\’: No such file or directory
/usr/bin/rm: cannot remove ‘2/’: No such file or directory
Here's the output from rm --version
:
rm (GNU coreutils) 8.21
...
Why would this be happening?