By default, GNU ls will quote entries containing certain special or unprintable characters. For example, if a file name contains the space character, GNU ls will print e.g. 'hello world'. This quoting is done using Bash syntax.
In Bash, 'folder'$'\003' (or $'folder\003') represents the text folder followed 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.
$ touch $'folder\x03'
$ ls --quoting-style shell-escape # the default'folder'$'\003'
$ ls --quoting-style c
"folder\003"
$ ls --quoting-style escape
folder\003
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\003I wouldn’t expect homework to use fish. It seems a less useful and niche as a learning exercise.