How can I remove a directory Fold1 (/home/Mydir/Fold1) which have 3 files in it .
-
rm /home/Mydir/Fold1
-
remove /home/Mydir/Fold1
-
rm -r /home/Mydir/Fold1
-
rmdir /home/Mydir/Fold1
C
Correct answer
Explanation
The rm -r command recursively removes a directory and all its contents, including the 3 files mentioned. Option A's rm without -r fails on non-empty directories with an error, while option D's rmdir only works on empty directories. Option B uses the non-standard 'remove' command.