LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-28-2005, 09:53 PM   #1
bernstein
LQ Newbie
 
Registered: Mar 2005
Posts: 20

Rep: Reputation: 0
how to delet non-empty dirs


I can't find the answer and it would just suck to delete all these files. I know there's a way to do it. Could somebody help me out?
 
Old 04-28-2005, 10:15 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Be careful to be in the correct directory.
rm -rf /home/test ## without prompts
rm -ri /home/test ## with confirmation prompts
 
Old 04-28-2005, 10:28 PM   #3
gnukish
Member
 
Registered: Apr 2005
Location: Neverland
Distribution: Slackware / Ubuntu
Posts: 171

Rep: Reputation: 30
rm -ri /home/dir_name is better , becuz confirmation is there...
 
Old 04-29-2005, 03:30 AM   #4
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
Arrow

Why do not add "-v" option? It is very boring process if directory is very big
 
Old 04-29-2005, 07:39 PM   #5
setenv02
Member
 
Registered: Apr 2005
Location: Chicago,IL
Distribution: redhat 9
Posts: 32

Rep: Reputation: 15
Type in the command rm -rf <dir> where the specified directory is the one you want removed. The options create it to not confirm the deletion of the directory or file. Good luck
 
Old 04-29-2005, 07:40 PM   #6
setenv02
Member
 
Registered: Apr 2005
Location: Chicago,IL
Distribution: redhat 9
Posts: 32

Rep: Reputation: 15
Make sure your not in the / directory. IT will format your disc so DO NOT run rm -rf /.
 
Old 04-30-2005, 01:07 AM   #7
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
it wont format, it will just delete all it can (which is about everything).
 
  


Reply



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
Gentoo VNC, empty dialog box !! "Question" window is empty ! TheHushedCaskeT Linux - Software 0 02-01-2005 10:14 PM
How to see just dirs with ls? d1s4st3r Linux - Newbie 3 06-04-2004 10:45 AM
ls, dirs first, files later TroelsSmit Linux - Newbie 4 05-31-2004 11:47 AM
how do you delet more than 1 line using SED jsandro7 Linux - Newbie 2 12-12-2003 03:55 PM
how to delet the contents of a directory using smbclient.. BrianK Linux - General 2 09-05-2002 02:46 PM

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

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

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
Open Source Consulting | Domain Registration