November 23, 2024, 08:36:59 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: How to delete a directory with all its content from command line(CLI)or console?  (Read 8114 times)

Offline Noob

  • Linux Noob !
  • *
  • Posts: 10
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.

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
You should see man page for "rm"
Try following command:
Code: [Select]
rm -rf <filename>

Offline satyamonline007

  • New Member
  • Posts: 1
 :) 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>
« Last Edit: December 04, 2007, 07:32:08 AM by satyamonline007 »

Offline Noob

  • Linux Noob !
  • *
  • Posts: 10
Thankyou Satyam and Ricky
It worked like charm :)

Offline ashokroy20002000

  • New Member
  • Posts: 2
Hi,
   It is so easy to delete ----

# rm -rf <file or directory name>