Linux 刪除文件夾和文件的命令

       -r 就是向下遞歸,無論有多少級目錄,一併刪除
       -f 就是直接強行刪除,不做任何提示的意思遞歸

刪除文件夾實例:
rm -rf /var/log/httpd/access
將會刪除/var/log/httpd/access目錄以及其下全部文件、文件夾刪除文件

刪除文件使用實例:
rm -f /var/log/httpd/access.log
將會強制刪除/var/log/httpd/access.log這個文件文件

相關文章
相關標籤/搜索