What Command will remove a Directory in UNIX?

Answer Posted / sambasivarao

This has two options

1) If directory is an empty directory
$rmdir <directory name>

2) If it is non-empty directory
$rm -rf <directory name>

-r means delete recursively
-f means delete forcibly.

It deletes your mentioned directory without informing
you that it is going to delete the whole directory (sub
directories and files in that directory)

J. Sambasivarao
91+ 9948280248

Is This Answer Correct ?    24 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which command can you use to find the currently running process in unix server?

568


Describe the zip/unzip command using gzip.

586


What do know about tee command and its usage?

569


Explain ‘system calls’ with respect to unix commands?

581


what is the advaantage of each user having its own copy of the shell?

2009






Differentiate cat command from more command.

557


Which command is used to delete all files in the current directory and all its sub-directories?

636


Explain command to show the space allocation of files?

605


What is awk good for?

563


What is a bash command?

601


What is the command to compare two files in unix?

594


What are the dos commands?

626


What is the behavioural difference between cmp and diff commands?

650


What is unix command line?

584


What does grep v grep do?

522