Main Content

Aladdin, or careful what you wish.

Archive - Originally posted on "The Horse's Mouth" - 2004-12-15 05:48:33 - Graham Ellis

Have you heard of the Linux user called Aladdin? He came across a command called "alias" one day, and the manual told him that it would make his wishes come true - that options that he wanted to be default would be, and that he could even make up his own new commands.

Aladdin felt this was too good to be true, so he created a little alias called "hello" that echoed back "hello to you too". And it worked! Wow!

Now Aladdin had always wanted the rm command (the one that deletes files) to ask if he was sure, so he created an alias to do that ((it's quite easy - the -i option)). And, again, Wow!

But the Aladdin was deleting files and tidying up for the system administrator who was away on holiday in Skeggy, and there were whole big directories of spam that needed deleting. And Aladdin got really rather bored with typing in "Y" hundreds of time .... so his third use of the alias command was to undo what he had done with the second use.

And the moral is ... Aliases can be useful, but the operating system designers probably put rather more thought that you will have done into what's the default, and they probably got it just about right for most of us.

[Advert] Learn more about using Linux ... [/Advert]