How do you remove a directory?



How do you remove a directory?..

Answer / hr@tgksolutions.com

Directories can be removed using the rmdir command for empty directories. For instance, rmdir directory_name will remove the named directory, provided it's empty. However, if you need to remove a directory and its contents, the rm command with the -r (recursive) option, like rm -r directory_name, becomes useful. Caution is advised, as this operation is irreversible and can quickly delete large amounts of data.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

Which command is used to create a directory?

0 Answers  


What happens when we execute a unix command?

0 Answers  


How do you move or rename a file or directory?

1 Answers  


What is use of sed command?

12 Answers   BitWise, Infosys, Reliance,


What is the command to check ports active in UNIX?

4 Answers   Accenture, IBM,






Explain command to show the space allocation of files?

0 Answers  


How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?

0 Answers  


What is s and g in sed command?

0 Answers  


Which command is used to kill the last background job?

0 Answers  


Explain command to view process running?

0 Answers  


What command is used to switching between users in unix?

0 Answers  


How to find and replace the below command?

2 Answers   HCL,


Categories