It is not recommended to use a * to remove files. It could match more than you like.
Being in Debian, the ls (from GNU) command is able to print the values of the files in quoted form[1]:
$ ls -Q
"\nssolve" "\n\nssolve" "y" "z"
Or, even better, list files with quoted names and inodes:
$ ls -iQ
26738692 "\nssolve" 26738737 "\n\nssolve" 26738785 "y" 26738786 "z"
Then, use rm with the inode number to ensure that only the correct files are removed:
$ find . -xdev -inum 26738737 -exec rm -i {} \;
The call to find is limited to one filesystem (-xdev) to avoid matching a file on other filesystem with the same inode number.
Note also that rm is being called with the -i (interactive) option, so it will ask in the command line if each file should be erased.
[1] Note that this do not solve the problem with visually confusing characters like a Cyrillic а ($'\U430') and a Latin a ($'\U61') that look exactly the same but are not. To have a better look at the bytes that a filename is using we need to use an hex viewer;
$ touch а a é $'e\U301' $'\U301'e
$ ls
a ́e é é а # what you "see" here depends on your system.
$ printf '<%s>' * | od -An -c
< a > < 314 201 e > < e 314 201 > < 303 251
> < 320 260 >
?, it's a non-printable character thatlsrenders as?. What's the output ofls | sed -n l?rm "?FileName"orfind . -name "\?*" -exec rm {} \;rm has not regex typermdoes not parse?or*, but the shell expands these globs beforermexecutes.ls -Qwould work better in Debian.