greendragon
01-27-2002, 05:09 AM
is there any way int he console to delete a folder with like 100s of files in it without ahveing to type 'y' for all the files to delete..its relaly pissing me off..
|
Click to See Complete Forum and Search --> : rm -r greendragon 01-27-2002, 05:09 AM is there any way int he console to delete a folder with like 100s of files in it without ahveing to type 'y' for all the files to delete..its relaly pissing me off.. DMR 01-27-2002, 05:44 AM Sure, use the f (force) option with the r option.rm -rf <directory_name>Be really careful with that though. The difference between "rm -rf /some_dir" and "rm -rf / some_dir" (note the space after /) could mean the difference between life and death for your filesystem. :eek: :D fateswarm 01-27-2002, 08:39 AM Don't remind me that day that I thought "sure, I'm gonna delete the whole system" and just after issueing the command, I remembered I had mount my windows partition on it :eek: ctrl-z is always a rescue though Strogian 01-27-2002, 11:27 AM Does Ctrl+Z stop it? I thought it just put it in the background. camelrider 01-27-2002, 11:42 AM Ctl+C. TacKat 01-27-2002, 01:05 PM Control-z suspends it temporarily. You then have to kill it, but it halts the damage. C-z or C-c can be a life saver - don't try to figure out which one would be better to press, just start mash one of them and quick! Strogian 01-27-2002, 01:10 PM Oh! Is there a way to put it in the background, and still have it running? vee-eye 01-27-2002, 01:56 PM Originally posted by Strogian: <STRONG>Oh! Is there a way to put it in the background, and still have it running?</STRONG> You would use the background task character: updatedb & Also, after you suspend it with ^Z, you can bring it into the foreground and start it again with fg PID/job number (I think that's only in Bourne-compatible shells). Originally posted by FateSWarm: <STRONG>Don't remind me that day that I thought "sure, I'm gonna delete the whole system" and just after issueing the command, I remembered I had mount my windows partition on it :eek:</STRONG> Have you ever issued rm -rf / for fun as a normal user thinking, "it won't do anything... I'm not root!" Bye-bye login directory. :( TacKat 01-27-2002, 02:32 PM Once you suspend it with C-z, you can tell it to keep running in the background by using "bg [job number]". Check out the BASH man pages under the "job control" section. kuber 01-27-2002, 03:28 PM Heh vee-eye, did you actually do that? :D greendragon 02-04-2002, 08:39 PM Heh..by what the computer is doing to me now rm -rf / as root might help mwhahah...*loks evily at the pos beside me...* "my turn to give you HEADACHES" NathanTwist 02-04-2002, 08:49 PM i usually jsut use rm -rf ./* call it cheap. i dunno :p PimpHolic 02-04-2002, 09:23 PM dont call me mean, but i extremely enjoy hearing stories of people trashing their systems :p not that it hasn't happened to me.. but i haven't totally trashed it vee-eye 02-04-2002, 09:59 PM Originally posted by kuber: <STRONG>Heh vee-eye, did you actually do that? :D</STRONG> No, but I was actually considering doing that as a "learning experience," when I realized... :) justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |