It's my first time: should I root?
I had to do an archive and install after some very scary weirdness two days ago. My machine hung on 'Waiting for netinfo' booting up; I couldn't boot from CD at all and starting up from an external hard drive in OS9 my own lovely hard drive wouldn't show up anywhere. It was very strange and I was very worried.
Anyways.
It's sorted now, but I have a Previous Systems folder with nearly a gigabyte of old system files and applications. They're all owned by root so I can't get rid of them.
Is there anything stopping me from logging in as root and putting them in the trash?
What's the best thing to do here?
Anyways.
It's sorted now, but I have a Previous Systems folder with nearly a gigabyte of old system files and applications. They're all owned by root so I can't get rid of them.
Is there anything stopping me from logging in as root and putting them in the trash?
What's the best thing to do here?
Comments
You can try Pseudo from Brian Hill.
http://personalpages.tds.net/~brian_hill/pseudo.html
Or you can go the more complicated route with the "sudo" command in the Terminal. Ask if you want instructions.
Originally posted by CubeDude
Or you can go the more complicated route with the "sudo" command in the Terminal. Ask if you want instructions.
Which is actually not that hard at all. All you do is open the terminal, type
sudo rm -dfr
and then (before pressing enter) drop the folder on the Terminal window (don't you just love drag 'n drop shell windows?) with all the old system files you wish to delete, THEN press enter.
sudo
rm /FolderToRemove
And then Ctrl-D twice to logout.
Originally posted by CubeDude
Hey, I didn't know that one. I always used:
Code:
sudo
rm /FolderToRemove
And then Ctrl-D twice to logout.
Yep, there's always something new I can learn.. thanx
Originally posted by CubeDude
Hey, I didn't know that one. I always used:
Code:
sudo
rm /FolderToRemove
And then Ctrl-D twice to logout.
I don't think that would work, to be honest. You're bound to get an error stating "xxx is a directory", with an occasional "xxx is not empty" to top that of. The way I see it, rm removes files, and although directories are considered files in Unix, it will not remove them willingly. That's were the -dfr comes in. d: attempt to remove directories as well as files. r: attempt to remove the hierarchy rooted in a directories. f: do not prompt for confirmation (f is not strictly necessary).
I tried the sudo and it won't work. I get this:
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Who knows why.
I'm going to download that shareware tool and if it does the trick he earns his $15.
What can I do? Where might I be going wrong with this sudo business from terminal?
do this:
In terminal, type in
sudo rm -drf
put a space after the -drf
drag the folder onto the terminal window, enter, and authenticate, should delete stuff.
Originally posted by Hassan i Sabbah
Cube and Kopf, thanks.
I tried the sudo and it won't work. I get this:
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
it seems like you misspelled the folder name to remove. Also, use extreme caution with 'sudo' especially when using it and 'rm'. sudo gives you super-user control over the computer, and accidentally mistyping the wrong folder can result in an unbootable computer. so, check your rm line several times before hitting enter. as for the shareware prog, i haven't tried it, so i dont know.
one thing you can do which is less dangerous, is change the owner of the offending folder (and subs/files), then use the finder to delete it. to do this you go into terminal, and type:
sudo chown -R <your user name goes here> <full Path to offending folder>
you can use der Kopf's drag and drop trick to get the folder's path. So you actually type 'sudo chown -R userName ' then drag the folder onto the terminal window. you should notice its full path written into that window (probably with some seemingly strange slashes; they help the shell program deal with any spaces or other difficult characters in the filename). i should also note that the user name you type has to be your short username, not the full name. You can find that out by typing 'echo $USER'. after dropping the folder, check the path, make sure it seems correct (and not something important, like '/' or '/System'), check it again, then hit enter. if you dont get an error message, close terminal and go to the finder. From there you should be able to move the folder into the trash and then empty the trash.
Originally posted by chych
You probably forgot a space...
do this:
In terminal, type in
sudo rm -drf
put a space after the -drf
drag the folder onto the terminal window, enter, and authenticate, should delete stuff.
That's it.
Thanks a million everyone. That's my archive de-archived.
Originally posted by chych
Speaking of rm, why do you need a d when you have an r in the options?
You don't, -r implies -d.
sudo rm -rf PATH_TO_FOLDER
You never need the -d flag (all you can do with that is deleting empty directories)
Originally posted by chych
Speaking of rm, why do you need a d when you have an r in the options?
That's my way of thanking whoever came up with that modifier
I have to say that I didn't know it wasn't necessary. I just skimmed through the man page one time, long ago, and took all the flags I thought I'd need.