linux中如何刪除文件

linux中如何刪除文件

linux下刪除文件用rm命令,具體用法如下:

rm?[選項]?文件

選項說明:

linux中如何刪除文件

linux相關視頻教程推薦:linux視頻教程

命令實例:

1、常規刪除a.txt文件

[root]#?rm?a.txt

2、強行刪除file.log文件

[root]#?rm?-f?file.log

3、刪除dirname目錄下的所有東西

[root]#?rm?-R?dir?dirname

4、刪除以 -f 開頭的文件

[root]#?touch?./-f[root]#?ls?./-f./-f[root]#?rm?./-f

或者使用

[root]#?touch?--?-f?[root]#?ls?--?-f?-f[root]#?rm?--?-f

相關文章教程推薦:linux視頻教程

以上就是

? 版權聲明
THE END
喜歡就支持一下吧
點贊13 分享