While creating a new folder I didn't realise that in BASH ' is a special character, which means I ended up with a folder named
One Flew Over the Cuckoos\ Nest\ \(1975\)?quit?quit()?ls??????????
or to be precise
drwxrwxrwx 1 root root 0 Mar 8 23:21 One Flew Over the Cuckoos\ Nest\ \(1975\)?quit?quit()?ls??????????
which is making my terminal freak out: Tab completion doesn't find it at all. If I try to open it via its inode I get an error:
LibreELEC:/var/media/MYNAME/Films # rm -r "$(find -inum 187)"
rm: can't remove './One Flew Over the Cuckoos\ Nest\ \(1975\)
quit
quit()
ls': No such file or directory
How badly did I mess up?
ls
as questionmarks), and"$( command )"
removes trailing newlines (but passes anything else unchanged). Notice that the error message showed the problematic filename value in singlequotes as./One ... quit newline quit() newline ls _no newlines_
– dave_thompson_085 Mar 09 '20 at 03:45