LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-21-2006, 01:11 AM   #1
jayukanna
LQ Newbie
 
Registered: Aug 2006
Posts: 3

Rep: Reputation: 0
Red face deleting folders with files


How do we delete folders which have files and subfolders?

I tried rmdir -p foldername.
this did'nt work.

I had moved a folder which had lots of subdirectories to a linux machine.
The last folder has lots of files too.

Iam unable to delete the parent folder.

Is there any method to force deletion?

Thanks,
Jayukanna
 
Old 08-21-2006, 01:14 AM   #2
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
rm -r <dir>

man is your friend::

man rm

Last edited by leandean; 08-21-2006 at 01:17 AM.
 
Old 08-21-2006, 03:14 AM   #3
jayukanna
LQ Newbie
 
Registered: Aug 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you so much!
 
Old 08-21-2006, 04:42 AM   #4
lordtweety
Member
 
Registered: Mar 2004
Location: Sydney
Distribution: Bodhi 3.0
Posts: 88

Rep: Reputation: 15
rm -rf <dir> Be warned, this command can be dangerous. It will indescriminately delete. I like installing windows on spare partitions just so I can use it.
Code:
# rm -rf /mnt/windows
 
Old 08-23-2006, 03:28 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
The '-f' is unneccssary in many cases, use it only when needed (read-only files and dirs).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting old files shiroh_1982 Linux - Newbie 2 06-21-2006 07:26 AM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 06:14 AM
Deleting files in C monil Programming 4 03-13-2005 10:33 AM
Deleting files! a_priebe47 Slackware 6 10-17-2004 09:58 PM
Deleting files ShakyJake Linux - Newbie 12 05-08-2003 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration