在linux中删除带有“-r”的文件名[复制]
发布时间:2020-12-14 02:41:16 所属栏目:Linux 来源:网络整理
导读:参见英文答案 How to cd into a directory with this name “-2” (starting with the hyphen)?6个 我无法使用rm -rf -r删除名为-r的文件名 是否有任何特殊技巧可以删除它? 解决方法 在Linux或类Unix系统中,您可能会遇到包含特殊字符的文件名,例如: ---;$?
参见英文答案 >
How to cd into a directory with this name “-2” (starting with the hyphen)?6个
我无法使用rm -rf -r删除名为-r的文件名 是否有任何特殊技巧可以删除它? 解决方法
在Linux或类Unix系统中,您可能会遇到包含特殊字符的文件名,例如:
- -- ; & $ ? * White spaces,backslashes and more.
提示#1:在文件名的开头尝试./ 删除名为’-file’的文件的语法如下:
提示#2:在文件名的开头尝试 – A -- signals the end of options and disables further option processing by shell. Any arguments after the -- are treated as filenames and arguments.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Linux上超过65536个TCP连接
- ss上的Rsync:“ERROR:模块是只读的”突然出现
- 关于linux上postgresql的一些理解
- linux – 将非PIC对象链接到具有PIC对象的可执行文件中是否
- linux – 用Qemu模拟Raspberry Pi Raspbian
- 在双节点Linux上,iSCSI目标的故障转移有多好?
- linux – 如何在Go中将消息打印到stderr?
- LINUX教程:Linux下OpenSSL静态库编译及使用
- linux – BASH … GNU Parallel
- linux – lspci“Memory at …”vs / proc / bus / pci / d