linux delete "-" folder

Delete the folder with "--" and report an error, as shown below:


rm -filename    (where " -filename " is the filename)

At this time, the system will report an error, prompting: invalid option. This is because the shell treats the file name after " - " as the parameter option of the previous rm command.

Solution:

rm -r - -791806387 /

View help

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326600074&siteId=291194637