Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Others => Miscellaneous => Topic started by: Noob on December 03, 2007, 09:53:37 PM

Title: How to delete a directory with all its content from command line(CLI)or console?
Post by: Noob on December 03, 2007, 09:53:37 PM
Unfortunately I am very new to linux but have I have assigned some crictical operation on our linux server.
I have to delete a directory and all its content from server from command line interface.
How I do ?

rm <filename> say directory not empty.
Title: Re: How to delete a directory with all its content from command line(CLI)or console?
Post by: Ricky on December 04, 2007, 06:52:32 AM
You should see man page for "rm"
Try following command:
Code: [Select]
rm -rf <filename>
Title: Re: How to delete a directory with all its content from command line(CLI)or cons
Post by: satyamonline007 on December 04, 2007, 07:29:05 AM
 :) Ok u want delete the folder at a time with inside all contentents of files & folders

Below given the command Type in Terminal ....
 #         rm -rf <filename or foldername>
Title: Re: How to delete a directory with all its content from command line(CLI)or cons
Post by: Noob on December 04, 2007, 12:05:49 PM
Thankyou Satyam and Ricky
It worked like charm :)
Title: Re: How to delete a directory with all its content from command line(CLI)or console?
Post by: ashokroy20002000 on January 07, 2008, 06:03:15 PM
Hi,
   It is so easy to delete ----

# rm -rf <file or directory name>