How to delete a directory containing files and folders?

Answers were Sorted based on User's Feedback



How to delete a directory containing files and folders?..

Answer / wizard_cmp@yahoo.co.in

rm -r <dir_name>

Is This Answer Correct ?    9 Yes 1 No

How to delete a directory containing files and folders?..

Answer / subbareddy kake

rm <file name>: For deleting the file

rm -i:It will ask conformation

rmdir:For removing the directory

rm -r:It remove recursively all files and directory itself

rm -rf: for deleting the all files and subdirectories in
current directory

Is This Answer Correct ?    7 Yes 0 No

How to delete a directory containing files and folders?..

Answer / padmanaban

"find -type d -iname 'directoryname' | xargs rm -rf" this is
also a way to remove the folder and files.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

What does the md command do?

0 Answers  


How do I run a bash script?

0 Answers  


What is the basic difference between unix and windows operating systems?

43 Answers   Bopro, College School Exams Tests, CTS, IBM, IT-Kids, Priyadarshini, Sybian Technologies, Tolani Maritime,


how to make IGNITE-BACKUP in HP-UX?

4 Answers   HP,


What is the function of grep command in unix?

0 Answers  






distinguish between interrupts and exceptions?

2 Answers   Infosys, Wipro,


Can you explain a little bit about command substitution?

0 Answers  


why metadb requires a seperate slice to create Solaris volume manager

0 Answers   Wipro,


distinguish between multi-tasking,multi-user,multi- processing and time sharing?

7 Answers   Alcatel, Cisco, Infosys, University Exams,


What is a command and examples?

0 Answers  


What is the syntax of grep command and what is its use?

6 Answers  


What are the differences among a system call, a library function, and a unix command?

0 Answers  


Categories