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

Why is it called a shebang?

0 Answers  


What is clustering in HP and how it's work?

1 Answers   HP,


Which command is used to kill the last background job?

0 Answers  


How to display a file name which has zero bytes in size.

11 Answers   Polaris,


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

0 Answers  






What is the comma to show the space allocation of files?

0 Answers  


what is telnet?

6 Answers  


Sorry to all Technical person for mistake of Question. Now i am post currect question Why copied file permission is changed in destination. When i give all permission i.e 777 to file and copy that to other location in destination the permission is 755. But if give permission 555 in destination that file permission is 555 and if give permission 444 to file after copy in destination the file permission is 444. These all are happening in normal user. How the umask value is calculate here really i am not understand. Please write the proper answer. Thanks in Advance

3 Answers   TCS,


How to setup sudo, only can use for particular date & time only ( for solaris10 )

1 Answers   ups,


what are filters?

6 Answers  


How do you find which version and name of unix you are using at the command prompt?

7 Answers  


How would you change all occurrences of a value using VI?

4 Answers  


Categories