LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-10-2005, 02:25 PM   #1
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Rep: Reputation: 30
remove a non empty directory in shell


dear all,

is there such a command? of course rmdir only removes non empty directory...

thanks,

aj.
 
Old 05-10-2005, 02:28 PM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
try " rm -R <dirname> "

egag
 
1 members found this post helpful.
Old 05-10-2005, 02:56 PM   #3
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
you could try "rm -rf directoryname". Use it with care, because any mistakes and you could hose your system (I have done it before and it wasn't a pleasant experience).
 
1 members found this post helpful.
Old 05-10-2005, 03:04 PM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
yeah....first fill in the dir-name, then use arrows to go back and fill in -rf or -Rf.

egag
 
Old 05-10-2005, 05:34 PM   #5
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
thank you guys this was exactly what i was looking for

cheers,

aj.
 
Old 06-28-2011, 07:11 AM   #6
themainliner
LQ Newbie
 
Registered: Apr 2005
Posts: 9

Rep: Reputation: 0
Thumbs up Works

wrong thread!

Last edited by themainliner; 06-28-2011 at 07:12 AM.
 
Old 06-28-2011, 07:20 AM   #7
harryhaller
Member
 
Registered: Sep 2004
Posts: 429

Rep: Reputation: Disabled
Quote:
Originally Posted by acidjuice View Post
thank you guys this was exactly what i was looking for

cheers,

aj.
Mark the thread as solved - see top of page - and mark the posts you found most useful - see bottom right corner of each post.
 
Old 06-28-2011, 09:50 AM   #8
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 14.1 64 Multi-Lib
Posts: 430

Rep: Reputation: 125Reputation: 125
Despite having almost 20 years of Unix experience, I still quiver a bit when deleting large quantities of files inside complex directory structures. I've got to the point where I rather fire up Midnight Commander and do it the easy way. Might take a bit longer, but it's very clear as to exactly what's going to get deleted.
 
1 members found this post helpful.
Old 06-28-2011, 10:16 AM   #9
harryhaller
Member
 
Registered: Sep 2004
Posts: 429

Rep: Reputation: Disabled
I too use MC - it's my user interface. I just use rm for deleting many files within a directory when I can take advantage of globbing.
 
Old 06-28-2011, 11:22 AM   #10
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Slackware64-14.1 (multi-lib) KDE 4.11.4
Posts: 1,422

Rep: Reputation: 137Reputation: 137
Quote:
Mark the thread as solved - see top of page - and mark the posts you found most useful - see bottom right corner of each post.
I suppose the O.P. could also have invented a time machine to carry out these functions that were not around at the time the thread was solved, 5/10/05.

It was nice to see the user name egag again, he helped me a great deal when I was a newbie.

samac

Last edited by samac; 06-28-2011 at 11:24 AM.
 
Old 06-28-2011, 12:02 PM   #11
harryhaller
Member
 
Registered: Sep 2004
Posts: 429

Rep: Reputation: Disabled
Red face

Oh dear - I've just checked out the dates now that you pointed it out - all this was started because someone posted on the wrong thread and revived an old one.

Yes, you're right it would have been difficult to mark it as solved in 2005.

Nevertheless, there are still loads of new threads which are left as still open and I am surprised by the profuse thanks given by OP's but they forget to tag the individual posts which they found helpful.

As they say, you can lead a horse to water but you can't force it to drink.

Anyway - bash threads never die!
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rm: cannot remove directory `ff': Directory not empty blancs Linux - General 17 08-29-2011 01:47 PM
How do you remove a non empty directory aaronruss Linux - Newbie 3 06-05-2004 08:26 PM
remove directory with shell command? khucinx Programming 2 05-19-2004 12:59 PM
RMDIR - how to remove a non-empty directory?? jacksmash Linux - Newbie 15 11-23-2003 12:51 PM
How to remove a non-empty dictory? Xiangbuilder Linux - Newbie 6 09-03-2003 03:40 PM


All times are GMT -5. The time now is 03:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration