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 are processor execution levels and priorities?

2 Answers   Infosys,


How can we "forked" process in UNIX? How then recognize in any of the branches we?

2 Answers   NIIT,


what is the default signal kill in unix?

8 Answers   IBM,


What are reported commands?

0 Answers  


in a growing log file how will you see the 1st 99 lines?

7 Answers  






what is the difference between commmands cmp and diff?

9 Answers   iNautix,


How would you find the size of a file or directory?

1 Answers  


What is the general format of unix command syntax?

2 Answers  


What is the command to find hidden files in the current directory?

0 Answers  


What is the command to find maximum memory taking process on the server?

0 Answers  


what are processor execution levels and priorities?

2 Answers   Infosys,


What is the size of time_t?

0 Answers  


Categories