原来由于文件名的第一个字符为“-”,Linux/Unix把文件名当作选项了。我们可以使用“--”符号来解决这个问题,通过man rm可以知道
A - permits the user to mark explicitly the end of any com-
mand line options, allowing rm to recognize file arguments
that begin with a -. As an aid to BSD migration, rm will
accept -- as a synonym for -. This migration aid may disap-
pear in a future release. If a -- and a - both appear on the
same command line, the second will be interpreted as a file.
如果是其他特殊字符的话可以在特殊字符前加一个“”符号,或者用双引号把整个文件名括起来。
如果是远程主机,还可以通过在windows系统使用ftp工具连接,在windows下能正常对这些文件名进行操作。
本站所有原创作品均遵循 『 创作共用 Creative Commons 』协议
您可以随意转载我博客里的文章,但非我允许不得用于商业用途,转载的时候请在醒目的位置注明原文的出处并附上链接
本文链接地址:http://www.palfans.net/blog/post/2006/12/125.htm