【问题标题】:Difference between delete and force delete in linuxlinux中删除和强制删除的区别
【发布时间】:2019-02-20 12:11:02
【问题描述】:

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

【问题讨论】:

标签: linux ubuntu terminal command


【解决方案1】:

如果你查看 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.

【讨论】:

    猜你喜欢
    • 2015-04-22
    • 2010-10-22
    • 1970-01-01
    • 2012-07-16
    • 1970-01-01
    • 1970-01-01
    • 2012-08-18
    • 2014-05-10
    • 2013-02-23
    相关资源
    最近更新 更多