Tab Completion if you’re unsure how to escape characters in this case. Start the name of the folder, then hit TAB a couple times
Is this homework of some sort?
By default, GNU
lswill quote entries containing certain special or unprintable characters. For example, if a file name contains the space character, GNUlswill print e.g.'hello world'. This quoting is done using Bash syntax.In Bash,
'folder'$'\003'(or'folder\003') represents the textfolderfollowed by octal byte 3. Because you use Fish instead of Bash, this doesn’t work—it has a different syntax to specify unprintable/special characters.I can tell you how to refer to this file in Fish, but I hesitate to do it if it’s for homework. What I will do is point you to the part of the Fish documentation where this is (kind of) explained: in Fish for bash users#Quoting.
Would it help to use
ls --literal --show-control-charsto find out if\003is indeed the representation of a special character?The default output itself is pretty definitive, assuming you are indeed using GNU
lsand don’t have theQUOTING_STYLEenvironment variable set. https://www.gnu.org/software/coreutils/manual/html_node/Formatting-the-file-names.html explains all this (including your options) and more.$ touch $'folder\x03' $ ls --quoting-style shell-escape # the default 'folder'$'\003' $ ls --quoting-style c "folder\003" $ ls --quoting-style escape folder\003
I wouldn’t expect homework to use fish. It seems a less useful and niche as a learning exercise.
Can you not rm -rf then tab and select the folder automatically formatted as needed?
As others have said, tab-complete should be able to do it. If not, here are two other options:
Is it the only “folder*” in the directory?
$ ls *folder* ‘folder’$‘003’If you only have that, you should be able to use the wildcards to delete it:
rm *folder*Another is just find the inode and delete using that:
$ ls -li | grep folder 5120013 .rw-rw-r-- user user 0 B Fri Jun 19 21:09:02 2026 ‘folder’$‘003’ $ find . -inum 5120013 -deleteI have uninstalled and reinstalled my WSL. Nothing exists now.
Nobody’s getting into the real issue lol. Yes, yes, tab completion. But all you need to do is escape the dollar sign:
\$. Or include it inside the single quotes.👍👍


