欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

linux下刪除帶-號的文件

 更新時間:2016年02月13日 14:52:57   投稿:hebedich  
本文給大家分享的是在linux下刪除帶“-”號的文件的方法,以及在刪除過程中遇到的問題,希望對大家使用linux能夠有所幫助。

不知為何主目錄下突然多了個-sV文件,目測是因為nmap的-sV參數(shù)產(chǎn)生的。

寫下來權(quán)當做個筆記~

現(xiàn)在來模擬下當時的情況

touch -- -sV
touch ./-sV # 兩種都行

現(xiàn)在工作目錄底下會產(chǎn)生一個文件名為-sV的文件
如果執(zhí)行

rm -sV

會產(chǎn)生一個錯誤

rm: invalid option -- 's'
Try 'rm --help' for more information.

原因是無效的參數(shù)s

本來打算Google下看看的,結(jié)果rm --help就看到答案了

To remove a file whose name starts with a '-', for example '-foo',
use one of these commands:
 rm -- -foo

 rm ./-foo

相關(guān)文章

最新評論