|
|
sudo rm -r * troubles ;-)
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
A friend of mine, wanted to be a *nix pro, with his OS X system... and did something a bit funny.
Code:
cd /
sudo rm -r *
Password:
Performed the task.
Then he suspended the task after a second or two.
To my suprise, he was able to restart. Doesn't seem to have any problems.
Think he deleted anything important?
Notices no changes. He boots, all apps are still there. No issues.
Odd eh?
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2001
Location: Somewhere in the land surrouding Fenway Park
Status:
Offline
|
|
Are you sure all his apps are there? It should work alphabetically, so the first app in his Appliction folder probally has some files missing from the package at least...
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2000
Status:
Offline
|
|
Yeah, I bet Address Book isn't looking so hot.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Nov 2001
Status:
Offline
|
|
I'd say... pretty soon he's gonna notice something that's pretty f*cked up.
I did this once by accident with a typo when I tried to delete the OS 9 system folder
(instead of rm -rf system\ folder I tried rm -rf system \folder and that's bad because it does 'system').
Anyway, I caught it after about 5 seconds but on reboot I had lines and crap all over the screen.
Trust me... he'll figure out soon that he's in deep sh*t. Back up the data, reformat, reinstall.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
The * saved his life. He just toasted everything in the current directory, wherever he happened to be located. If it had been / instead, he'd have removed everything
So, probably everything in his home dir is gone (that's the default dir for new shells). And tell him not to use the shell unless he knows what he's doing.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Originally posted by Angus_D:
The * saved his life. He just toasted everything in the current directory, wherever he happened to be located. If it had been / instead, he'd have removed everything
He cd'd to / in the first line.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status:
Offline
|
|
If you look, you'll see he didn't use the -f switch. This forces deletion, and you have to use it if you want to delete things that belong to the root user for instance. Normally rm will prompt you for permission without the -f option.
|
weird wabbit
|
|
|
|
|
|
|
|
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status:
Offline
|
|
Originally posted by theolein:
If you look, you'll see he didn't use the -f switch. This forces deletion, and you have to use it if you want to delete things that belong to the root user for instance. Normally rm will prompt you for permission without the -f option.
Notice that the original poster did "sudo".
A series of tests...
>sudo which rm
/bin/rm # ergo it is not aliased to rm -i
>touch test
>sudo rm test
no prompt. I've always found -f is the default, and if I want -i behavior I have to alias rm 'rm -i'. This with 15 years experience over various flavors of unix.
Mike
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Sep 2002
Status:
Offline
|
|
Originally posted by Zim:
I've always found -f is the default, and if I want -i behavior I have to alias rm 'rm -i'. This with 15 years experience over various flavors of unix.
Mike
Yup, I do the same thing with every shell on Unix machines that I work with. It's way, way too easy to type the wrong thing into the shell and end up deleting a file you didn't intend to.
Now if I can just prevent myself from piping and redirecting stuff into wrong place...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|