Which command would not delete the user's home directory?

Enhance your cybersecurity knowledge with the TestOut Security Pro English 8.0 Test. Ace your exam with insightful questions and detailed explanations. Boost your career prospects!

Multiple Choice

Which command would not delete the user's home directory?

Explanation:
The command that would not delete the user's home directory is the one specified with the "-h" option, which is not a valid command in the context of user deletion. The typical options for the userdel command include "userdel" without any flags, which removes a user but does not delete their home directory, and "userdel -r," which does delete both the user and their home directory. Using "userdel bsmith" alone will remove the user account but leave the home directory intact. The command "userdel bsmith; rm -rf /home/bsmith" explicitly states to remove the user and then forcibly remove the directory in a sequential manner, which would lead to the deletion of the home directory after removing the user. Overall, without any valid "-h" option in this command context and based on standard command usage, it will not affect the home directory, making it the appropriate choice.

The command that would not delete the user's home directory is the one specified with the "-h" option, which is not a valid command in the context of user deletion. The typical options for the userdel command include "userdel" without any flags, which removes a user but does not delete their home directory, and "userdel -r," which does delete both the user and their home directory.

Using "userdel bsmith" alone will remove the user account but leave the home directory intact. The command "userdel bsmith; rm -rf /home/bsmith" explicitly states to remove the user and then forcibly remove the directory in a sequential manner, which would lead to the deletion of the home directory after removing the user.

Overall, without any valid "-h" option in this command context and based on standard command usage, it will not affect the home directory, making it the appropriate choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy