difference b/w halt shutdown

Hi,
I want to know the difference between halt and shutdown commands and which is better to use?

Regards,
visu

The shutdown command runs various shutdown scripts and then finally invokes the halt command. Not running those scripts could be a problem depending on what they do. As one example, if you are running an Oracle database, you could lose transactions or even mangle the database. The shutdown command can also notify the users that a shutdown is about to happen. So yes you should use the shutdown command rather than halt. But if you tried shutdown and it hung, a halt command is better than simply turning off the power switch because "halt" will at least attempt to sync the disks which is better than nothing.

The shutdown command will only result in the halt command being run if you are halting the system. My feeling is that most shutdown commands are to reboot the system rather than halt it. These wind up invoking "reboot" rather than "halt". And "shutdown" is better than "reboot" for this. Again, you want those shutdown scripts to run.

Hi,
Thank you very much for your explanation.

Regards,
visu
:b: