Unix - Study Mode

[#1001] Which of the following command will remove the file named * ?
Correct Answer

(D) rm '*' and rm *

[#1002] Which option is used with ps command to list system processes?
Correct Answer

(D) -A and -e

[#1003] Which of the following command will be used if we want to abort editing and quit the editor even if the buffer has been changed and not saved?
Correct Answer

(C) :q!

[#1004] Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on it
Correct Answer

(C) -i

Explanation

Solution: In Unix, the rm command is used to remove files or directories. The -i option prompts the user for confirmation before deleting each file. When this option is used, rm will display the filename followed by a question mark (?), and the user needs to confirm by typing 'y' for yes or 'n' for no. So, -i is the option used with the rm command to prompt the user with each filename and a question mark before acting on it.

[#1005] Which of the following directories contain all the Alias created by a user, including his login directory?
Correct Answer

/tmp

Explanation

Solution: The correct answer is Option E: None of the above . In Unix, the directory that contains all the aliases created by a user, including their login directory, is typically the user's home directory. By default, aliases are usually stored in a user's configuration files such as .bashrc or .bash_profile located in their home directory. Therefore, None of the above options is the correct directory for storing user aliases.