Originally posted by PCUser
Really, did any of you guys besides mrtrumbe know what root is and how to get to root?
Yeah, I know how, but I had a meeting at work. It's awfully rude of them to keep interrupting my MacRumors posting with this "work" stuff, but what's a guy to do?
BTW, I know what root is and how to get to it in Linux, but what if I didn't in MacOS X?...
If you're comfortable administrating Linux, then you surely would have the necessary metaskills in UNIX to find your way around in Darwin, at least enough to have an idea where to look and what to ask.
Look, the fundamental issue here is that familiarity with modern user-friendly operating systems doesn't really lend much to a person's first forays into a UNIX environment. When people start asking questions, you find it's difficult
not to be obscure in your answers, because the operating system and most of the common UNIX utilities were designed by people who, by and large,
enjoy obscurity. For most of the history of computing, designing intuitive interfaces was considered a waste of time, both real time and system processing time, and UNIX is rooted in that tradition. I've often said that Mac OS X is like a dream OS for me, because I've got the power and direct control of a UNIX environment with a GUI that doesn't suck (unfortunately, I very nearly detest X11), so I can take off my hacker hat and put on my user hat when I just need to get regular stuff done.
Personally, I'm all in favor of spreading knowledge, but I don't really think someone's first experiences in UNIX should be at a '#' prompt. If you want to go in that direction, my recommendation is to pick up one of the dozens of beginner UNIX references out there. The canonical text is
A Practical Guide to the UNIX System by Mark G. Sobell, though I don't remember it being so expensive when I got my first copy.
If all you want to do is get rid of some files that won't empty out of the trashcan, the way to do that is to open a Terminal window, type '
cd .Trash' (".Trash" is the directory that corresponds to your desktop trashcan). Use '
ls' to list the contents of the directory if you need to, but it should be identical to what you see in your trashcan. Type '
sudo rm -f <filename>' to get rid of a file. If it's a directory (or a bundle like a .app, which is really a directory anyway) that won't go away, use '
-rf' instead of just '-f' ("rm" means "remove." 'r' and 'f' are option flags. 'r' is for "recursive," which means it will delete all the files in a directory and any subdirectories. 'f' is for "force," which will make rm ignore some typical non-fatal reasons rm might fail). Of course, be very careful what you delete. You will be asked for your password, and after you provide it, the file will be blown away (using root permissions).