Deleting files that cannot be normally deleted on Linux
To delete a file, run the rm command.
However, files whose names begin with "-" or contain spaces or metacharacters (meta-characters) cannot be deleted because the shell cannot recognize them correctly.
However, in Windows and MacOS, files and directories can be created, so if a file is shared or uploaded, a file with such a name may exist in Linux.
In this case, if the name contains a hyphen "--", you can either delete the file by adding the "--" option to the rm command and specifying the file containing the hyphen as an argument, or you can prefix the file name with". /" at the beginning of the file name to delete it.
Files containing spaces can be removed by enclosing the file name in quotation marks '' or double quotation marks "", or by prefixing the space with an escape sequence.
2020.09.23
Directory and file operationsLinuxTips(RedHat)_en