【发布时间】:2024-10-20 08:20:02
【问题描述】:
我不小心创建了一个名为“--address=16.187.249.27”的文件,并尝试以下方法删除它,但没有成功:
$ rm "--address=16.187.249.27"
rm: unrecognized option '--address=16.187.249.27'
Try 'rm ./'--address=16.187.249.27'' to remove the file ‘--address=16.187.249.27’.
Try 'rm --help' for more information.
$ rm "\--address=16.187.249.27"
rm: cannot remove ‘\\--address=16.187.249.27’: No such file or directory
如何删除以“--”开头的文件?
【问题讨论】:
-
rm -- yourfilename -
rm也很有帮助,可以准确地告诉你如何删除你的文件。