Linux Command Summary --rm command

(From http://www.cnblogs.com/xqzt/p/5398919.html )

1, brief order

RM (the Remove File delete directories or files) to delete the file for the linked file, simply delete the entire link file, and the original file remains unchanged.

2, usage

rm [option] ... file ..

3. Options

-f, - Force forcibly removed. Ignore nonexistent files, without prompting for confirmation - i need confirmation before deleting 
 -r, -R, - recursive This recursively delete the directory and its contents 
 -v, -verbose display detailed steps

4. Examples

Example 1: delete files, display details
[root @ oracledb dir1] # RM -v b.txt 
RM: whether to remove ordinary empty file "b.txt"? y 
Deleted "b.txt"
Example 2: Delete Confirmation ago
[root @ oracledb dir1] # -vi a.txt RM 
RM: whether to remove ordinary empty file "a.txt"? y 
Deleted "a.txt"
Example 3: Force Delete
[root @ oracledb dir1] # rm -fv a.txt 
deleted "a.txt"
Example 4: Recursive Delete
[root @ oracledb dir1] # rm -rfv dir2 / 
deleted "dir2 / a.txt" 
Deleted "dir2 / dir3 / c.txt" 
deleted directory: "dir2 / dir3" 
deleted directory: "dir2"

Guess you like

Origin www.cnblogs.com/hanjiali/p/11589365.html