> ## Content Index
> Fetch the complete content index at: https://b.1994h.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Linux VPS删除文件命令
- URL: https://b.1994h.com/linux-vps-delete-file-command/
- Published: 2012-05-16T22:37:48.000Z
- Updated: 2012-05-16T22:37:48.000Z
- Author: Mark
- Tags: vps, #Migrated-1795060647921, #wp, #wp-post, #Import 2026-11-19 03:57

大家介绍的是linux系统下常见的删除命令，现在在VPS里用的比较普遍。删除命令直接rm就可以了，不过要加个参数-f

即：rm -f 文件路径

\-f 就是直接强行删除，不作任何提示的意思

\*删除文件使用实例：

> \# rm -f /www/home/example.php

这个命令将会强制删除/www/home/example.php这个文件 \*删除目录使用实例：

> \# rm -rf /www/home/example

这个命令将会删除/www/home/example目录以及其下所有文件、文件夹

需要提醒的是：使用这个rm -rf的时候一定要格外小心，linux没有回收站的

当然，rm还有更多的其他参数和用法，输入man rm 命令就可以查看了。