LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 09-30-2003, 11:53 PM   #1
kfrancisco
LQ Newbie
 
Registered: Oct 2002
Location: USA/Louisiana/New Orleans
Distribution: Red Hat 9
Posts: 16

Rep: Reputation: 0
Remove directory w/ files


is there a command i can type to remove a directory w/ files in it.

My computer won't boot and I'm assuming because it has no free space in the / directory. Although I believe the /boot directory had free space.

It goes through the procedure of loading fine, than it tries to bring up the GUI interface and flickers about 3 times displaying the text screen every 10 seconds.

Please help
 
Old 10-01-2003, 12:09 AM   #2
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
yes
rm -rf
it will delete anything and everything you specify - say for instance the whole / directory - so be careful with it because if you type something wrong it could be disasterous.
 
Old 10-01-2003, 12:09 AM   #3
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
that's sounds like a X configuration error to me. it's basically respawning as there's something wrong with your video setup. i'm not sure what the right way is to do something when that happens, but when it happened to me, i would log in when it took a break from respawning and run a X configuration tool... hopefully finish fast enough before the next wave of respawn occurred.

i think for your version of red hat, the tool you'll need to use is this command:

redhat-config-xfconig
or
redhat-config-xf86config

i'm not sure exactly the command. but if one of those works, set up your video and monitor to use just the generic video and monitor drivers. video = vesa driver, monitor = generic XXXX

where XXXX is some kind of generic resolution, description, etc...
also if asked to probe, don't probe. instead enter values like video memory manually.

i'm on redhat 7.3 so these instructions are primarily based off my X configuration tool and they may not be exactly right for your version of red hat.

edit: i just noticed that you don't have which version of red hat you're using in your member info. i thought you were running red hat 9. anyway, if you're using 7.X, the x configuration tool you need is the command: Xconfigurator
i think rh 8.0 is the same thing as rh 7.3

Last edited by megaspaz; 10-01-2003 at 12:11 AM.
 
Old 10-01-2003, 12:16 AM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Before you start deleting things, have you checked to see whether or not your directories really are full? You can run this to determine the usage of your various paritions: df

Obviously if you see things 98% or 99% full, you probably do want to start deleting obsolete files, but otherwise, I'd be skeptical of an overly full partition being the cause of the problem you described. -- J.W.
 
Old 10-01-2003, 06:39 AM   #5
kfrancisco
LQ Newbie
 
Registered: Oct 2002
Location: USA/Louisiana/New Orleans
Distribution: Red Hat 9
Posts: 16

Original Poster
Rep: Reputation: 0
I am using Red Hat 9 btw. When i initially set up Linux, I installed the generic/default drivers it detected and never added any new ones. The only thing I can think of is that I made that partition totally full.

BUt I will try the X configuration error procedure and post my results ASAP
 
Old 10-01-2003, 11:31 PM   #6
kfrancisco
LQ Newbie
 
Registered: Oct 2002
Location: USA/Louisiana/New Orleans
Distribution: Red Hat 9
Posts: 16

Original Poster
Rep: Reputation: 0
hey you guys...I don't know if I'm using the rm -rf command incorrectly, but here is what I'm doing

loads up and goes to text login

login: root
pass: ******************

cd Oracle/ 9i
rm -rf Disk1


nothing happens...can someone give me a good example or explanation?
 
Old 10-01-2003, 11:37 PM   #7
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
the space in your path. cd won't work unless you put quotes around the part with the space in it.

if what you typed is a typo, then rm -[r]f won't give you any feedback whatsoever (actually even if the directory or file doesn't exist, rm -[r]f still won't give you any feedback). do the command "ls -al" and see if the directory that you wanted to delete is still there. also check your spelling. case matters in linux.

Last edited by megaspaz; 10-01-2003 at 11:39 PM.
 
Old 10-01-2003, 11:51 PM   #8
kfrancisco
LQ Newbie
 
Registered: Oct 2002
Location: USA/Louisiana/New Orleans
Distribution: Red Hat 9
Posts: 16

Original Poster
Rep: Reputation: 0
when I created the folder....in the linux GUI...it was "Oracle 9i"...when I enter "dir" when im in my root folder...it shows the folder as "Oracle/ 9i". and if i type "cd Oracle/ 9i" it actually goes to the "Oracle 9i" folder...the directory is defenitely there.

im very new to this (especially troubleshooting this error)

does my syntax need to be (example):
1. rm -[r]f /root/Oracle/ 9i/Disk1
2. rm -[r]f /root/Oracle 9i/Disk1
3. Other
 
Old 10-01-2003, 11:56 PM   #9
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
like i said. none of those will work unless you put quotes around the part with spaces.

../"Oracle 9i"/...
../Oracle/" 9i"/...

but if you made a directory in the gui as "Oracle 9i", there's no reason why it would have the "/" between "Oracle" and "9i".
 
Old 10-02-2003, 12:18 AM   #10
kfrancisco
LQ Newbie
 
Registered: Oct 2002
Location: USA/Louisiana/New Orleans
Distribution: Red Hat 9
Posts: 16

Original Poster
Rep: Reputation: 0
thank you for clarifying that...
i would really appreciate it if someone could give me a full syntax...

is the command rm -rf or rm-[r]f.... please...full code example
 
Old 10-02-2003, 12:21 AM   #11
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
rm -rf /home/user/Documents
to remove recursively all the contents of /home/user/Documents without asking.
rm -f /home/user/Documents
to remove all the contents of /home/user/Documents without asking but not its subdirectories. the [r] were indicating that it's optional.
 
Old 10-02-2003, 12:23 AM   #12
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
rm -rf location_of_directory

I was using that command a few days ago when I wanted to erase
/usr/lib/apt , but I put in /usr/lib instead. I killed my system

this is what I should have put in
#rm -rf /usr/lib/apt
 
Old 10-02-2003, 12:27 AM   #13
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
yeah. for directories it's -rf. -[r]f denotes that the 'r' option is optional. sorry for any misunderstandings.
 
Old 10-02-2003, 01:40 AM   #14
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
heh heh heh

that's really not a good command to be confused about.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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
Remove ALL files from specific Directory bianchi Programming 9 11-23-2005 11:27 PM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 10:55 PM
how to remove a directory Meatball1337 Linux - Software 2 10-10-2004 09:39 AM
Remove Files from the Directory .... shib_s Linux - Security 2 08-28-2001 05:53 PM


All times are GMT -5. The time now is 10:38 PM.

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