What Command will remove a Directory in UNIX?
Answers were Sorted based on User's Feedback
Answer / ziauddin
rmdir directoryname
note the directory must be empty
| Is This Answer Correct ? | 27 Yes | 3 No |
Answer / 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 |
for removing directory
rm -rf *
for all dir
| Is This Answer Correct ? | 19 Yes | 3 No |
Answer / swathi
$rm -r dir1
-r removes all contents of dir1 and also dir1 itself.
| Is This Answer Correct ? | 16 Yes | 1 No |
Answer / khemnath chauhan
$rmdir <dirname>
will remove the diretory.
$rmdir -i <dirname>
will remove interactively
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / brijmohan
rmdir is used.
we can also use rm -rf to remove directory recursively.
means it will first remove all files and folder from that
directory then it will remove current folder.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suryakanta
rm-rf directoryname
this will remove the directory forcefully from unix.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is ‘du’ a command? If so, what is its use?
How to remove a crontab file?
how to remotely move a file ??? that mean how to move a file one machine to another machine ???
How do you find out all processes that are currently running in UNIX OS?
How do you grep a case insensitive?
What is the comma to show the space allocation of files?
How do I delete files from command prompt?
Explain command to display different lines that are found when compare two files?
When the shell is reading the command line what is the difference between text enclosed between double quotes ( ” ) and text enclosed between signal quotes ( ’ )?
what are processor execution levels and priorities?
Explain the read, write, and execute permissions on a UNIX directory.
What is the function of grep command in unix?