I was running a Python script that malfunctioned and used sudo
to create a file named >
.
How can I get rid of this file?
Of course, when I try sudo rm >
, I get the error bash: syntax error near unexpected token 'newline'
, because it thinks I'm trying to redirect the output of rm
.
Its permissions are -rw-r--r--
.
sudo touch >
at a shell would give the same error.) You said it was with a Python script, presumably created by passing">"
to someos
function. Sosudo python <<< 'import os; os.remove(">")'
should work just fine.