Rohit forced the electrons to say:
> Does the same happen in Linux/Unix? Why does it happen? Someone from CS
> background or otherwise could provide theory [and if it is different in
> Linux?

Well, the simple answer is that by altering the bytes in binaries, you
mess the way data structures are stored on the filesystem.  What you
have to be careful of while editing binaries is that the alignment of
bytes in the binary has to be proper wr to the architecture in question.

You cannot edit a binary file in a text editor like vi, since it has
the habit of putting in newlines (especially at the end of file) ruining
the format of the file. emacs has a binary editing mode, and so has vim
(vim -b). But you have to be careful to keep the correct number of bytes
in the file. So you should be replacing, and in case of executables,
only from the text area.

vim also has a support program called xxd that helps you edit binary
files.

Binand

-- 
The prompt for all occasions:
export PS1="F:\$(pwd | tr '/[a-z]' '\134\134[A-Z]')> "
--------------- Binand Raj S. ([EMAIL PROTECTED])


-----------------------------------------------------------------------
LIH is all for free speech.  But it was created for a purpose - to help
people discuss issues about installing and running Linux.  If your
messages are counterproductive to this purpose, your privileges to
submit messages can and will be revoked.

Reply via email to