0

When trying to run a PHP script under Linux, my command fails and I inherited a a new file in the folder.

The file is called ");? ?for ($j=0;$j".

Impossible to delete with rm, impossible to move...Screenshot

Any idea, please ?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
JDEC
  • 93
  • 8
  • The way I would go is type `rm \"`then type tab. – Tom Feb 21 '19 at 09:14
  • Sorry, could you elaborate ? Not sure I get the exact command... – JDEC Feb 22 '19 at 07:51
  • 1
    The idea is that your file starts with the " character, so i suggested you typing the start of the command, then using the tab key for bash completion. Otherwise you can search for which characters you shourd escape. – Tom Feb 22 '19 at 18:24
  • Magnificent !! The idea of escaping the 1st caracter is briliant. Actually it was a "(" and escaping it worked. Many thanks – JDEC Feb 23 '19 at 09:02

1 Answers1

0

Just an untested idea :

Maybe you can try to delete all the repository, with rm -R folder_name. You could also add -f : rm -R -f folder_name

Of course, don't forget to save the other files beforehand, but it should be easy as there are just a few.

Eyap
  • 754
  • 1
  • 7
  • 22
  • That (unfortunately) does not work. CentOS prevents the deleting of the folder because of the file... – JDEC Feb 22 '19 at 07:51