Разница между удалением и принудительным удалением в Linux - PullRequest
0 голосов
/ 16 сентября 2018

Я действительно запутался, в чем разница между DELETE и FORCE DELETE.чем rm -r dir отличается от rm -f file.Спасибо.

1 Ответ

0 голосов
/ 16 сентября 2018

Если вы загляните в man-страницы 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.
...