gpt4 book ai didi

linux - linux中删除和强制删除的区别

转载 作者:太空宇宙 更新时间:2023-11-04 05:59:43 29 4
gpt4 key购买 nike

我真的很困惑 DELETE 和 FORCE DELETE 之间的区别是什么。rm -r dirrm -f file 有何不同。谢谢。

最佳答案

如果你查看 rm 的手册页,你会看到它到底做了什么:

-f           Attempt to remove the files without prompting for confirma-
tion, regardless of the file's permissions. If the file does
not exist, do not display a diagnostic message or modify the
exit status to reflect an error. The -f option overrides any
previous -i options.

-R Attempt to remove the file hierarchy rooted in each file
argument. The -R option implies the -d option. If the -i
option is specified, the user is prompted for confirmation
before each directory's contents are processed (as well as
before the attempt is made to remove the directory). If the
user does not respond affirmatively, the file hierarchy
rooted in that directory is skipped.

-r Equivalent to -R.

关于linux - linux中删除和强制删除的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52352991/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com