LINUX

LINUX RM指令

介紹

rm指令用來刪除檔案(夾)。

語法

rm [options] files | directories

常用的options

-i  Interactive mode. Ask before deleting each file.

-f  Force the deletion, ignoring any errors or warnings.

-r  Recursively remove a directory and its content. Use with caution, especially if combined with the -f option, as it can wipe out all your files.

範例

你可以刪除一個或多個檔案:

⤍ rm file1 file2

使用-r,你可以刪除一個或多個檔案夾:

⤍ rm -r dir1 dir2

發佈留言