Rm
rm -r path :如何避免在每個級別都被問到?
如果我想刪除該路徑,如何避免在每個級別被詢問?我只想刪除路徑中的所有內容?
-I
如果您只想被提示一次,您可以使用switch:rm -rI sampledir/
來自
man rm
:-I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistake
並
-f
用於“無提示”:-f, --force ignore nonexistent files and arguments, never prompt
所以:
rm -rf sampledir/