On Monday, Aug 25, 2003, at 16:58 Asia/Tokyo, Brian Ferguson wrote:

On August 25 2003, Kino <[EMAIL PROTECTED]> wrote:

sudo rm -r /Library/Services/OkitoThesaurus.service

This was my first effort at using Terminal. What I found interesting is that I could not be certain where I was going because not all key-strokes appeared and then as soon as I entered the password, nothing much happened except that OkitoThesaurus.service had gone. Magic.

It's not a magic. sudo is "do a command simulating another user". If no user is specified like in this case, it executes a command as root user.


rm is remove and -r option stands for recursively. So the entire line means "execute remove command recursively against /Library/Services/OkitoThesaurus.service with root user privilege".

"recursively" is required here because OkitoThesaurus.service is a bundle, i.e. folder containing file(s) and subfolder(s). On OS X, you have many bundles, rtfd files, frameworks, Cocoa apps including Nisus Writer Express and some Carbon apps.

Your password did not appear in order to prevent someone behind you to steal it.

If you'll need using 'sudo rm -r [filepath]' again to get rid of a file/folder, it would be safer not to type filepath manually but to let Terminal to get it. I.e. type 'sudo rm -r ' (without quotes), drag and drop the file onto Terminal window. Otherwise, a special character in file/foldername may produce unexpected result. For example,

sudo rm -r /Applications/Internet Explorer.app

will not remove '/Applications/Internet Explorer.app' but will try to delete '/Applications/Internet' and '/Users/your_account/Explorer.app' because the space between '/Applications/Internet' and 'Explorer.app' works as file separator.

If you drag and drop IE onto Terminal window, it will be shown as '/Applications/Internet\ Explorer.app' where the backslash disables the special meaning of the following space character so that it will be interpreted as a single path.

Enclosing a path between single or double straight quotes will have the almost same effect.

sudo rm -r "/Applications/Internet Explorer.app"
sudo rm -r '/Applications/Internet Explorer.app'


As an ex-DOS user, I don't feel anything supernatural in these commands. Of course, this is just my idiosyncrasy, I know. Anyway, for me, they are simple and can be understood literally. What is really magical is visual representation like that of Finder.



Kino



Imagine there's no Finder It's easy if you try No desktop below us Before us only shell Imagine all files Having their own path...

(but CUI is also illusion since it's still UI, oh, I know, I know�;-)




--------------------------------------------------- The Nisus Interactive List [EMAIL PROTECTED]

Searchable archives:
http://www.mail-archive.com/nisus-interactive%40nisus.com/

To unsubscribe from this list please send a message with "unsubscribe
nisus-interactive" in the body of the email to [EMAIL PROTECTED]




Reply via email to