MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If rmdir dir001 fails, what could be the reason(s)?
A
dir001 doesn’t exist
B
dir001 is not empty
C
permissions of dir001 doesn’t allow to remove it
D
All of The above
Explanation: 

Detailed explanation-1: -If rmdir dir001 fails, what could be the reason(s)? Explanation: There could be multiple reasons which could lead to failure while removing a directory. Major reasons could be:-> directory doesn’t exists.

Detailed explanation-2: -Solution(By Examveda Team) RD command or RMDIR commands can be used to remove a directory if it is empty. Del command and Erase commands are used to delete files not directories.

Detailed explanation-3: -Use the rmdir command to remove the directory, specified by the Directory parameter, from the system. The directory must be empty (it can contain only .

Detailed explanation-4: -Explanation: rm command is used in UNIX to remove one or more files. It operates silently and should be used with caution. The filename of the file to be deleted is provided as an argument to rm command. For example, following command deletes abd.

Detailed explanation-5: -The pwd command can be used to determine the present working directory. and the cd command can be used to change the current working directory.

There is 1 question to complete.