在linux下删除文件用rm命令,具体用法如下:
rm [选项] 文件
选项说明:
命令实例:
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
喜欢就支持一下吧
相关推荐