LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Remove directory w/ files (http://www.linuxquestions.org/questions/linux-software-2/remove-directory-w-files-98860/)

kfrancisco 09-30-2003 11:53 PM

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 :(

mossy 10-01-2003 12:09 AM

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.

megaspaz 10-01-2003 12:09 AM

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

J.W. 10-01-2003 12:16 AM

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.

kfrancisco 10-01-2003 06:39 AM

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

kfrancisco 10-01-2003 11:31 PM

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?

megaspaz 10-01-2003 11:37 PM

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.

kfrancisco 10-01-2003 11:51 PM

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

megaspaz 10-01-2003 11:56 PM

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".

kfrancisco 10-02-2003 12:18 AM

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

quatsch 10-02-2003 12:21 AM

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.

shanenin 10-02-2003 12:23 AM

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

megaspaz 10-02-2003 12:27 AM

yeah. for directories it's -rf. -[r]f denotes that the 'r' option is optional. sorry for any misunderstandings.

mossy 10-02-2003 01:40 AM

heh heh heh

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


All times are GMT -5. The time now is 12:20 AM.