What effect does the -f option to the update-rc.d command have on files in the /etc/rcX.d/ and /etc/init.d/ directories?



A. It will force the removal of the symlinks in /etc/rcX.d/ even when the links are read only
B. It will remove both the symlinks in /etc/rcX.d/ and the init script in /etc/init.d/
C. It will remove the init script in /etc/init.d/ and the symlinks in /etc/rcX.d/ and update the package information of installed files
D. It will force the removal of symlinks in /etc/rcX.d/ even if the corresponding init script still exists in /etc/init.d/

題解

Debian系列的Linux發行版可以使用「update-rc.d」指令來啟用、停用或是刪除指定的init腳本(的符號連結)。在使用「remove」參數的時候可以搭配「-f」參數來強制刪除仍然存在的指定init腳本的符號連結。

例如要停用「dovecot」這個init腳本的符號連結,指令如下:

update-rc.d -f dovecot remove

所以答案是選項「D」。