change specified byte in a hex file

2013-06-03 Thread s m
hi folks,

i want to change a specified byte in a hex file. i want to edit my file and
change byte 0x28a content from 0x08 to 0x14.

i try to do it with hex-editor in windows but this file is too big and i
can't transfer it to the other system. i think it should be done by some
commands such as dd but i don't know how to use it.

please help me to edit my file.
thanks in advance,
SAM
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: change specified byte in a hex file

2013-06-03 Thread s m
thanks Ayan,

but isn't there any command in freebsd to do it for me??


On Mon, Jun 3, 2013 at 11:06 AM, Ayan George a...@ayan.net wrote:

 On 06/03/2013 02:28 AM, s m wrote:
  hi folks,
 
  i want to change a specified byte in a hex file. i want to edit my file
 and
  change byte 0x28a content from 0x08 to 0x14.
 
  i try to do it with hex-editor in windows but this file is too big and i
  can't transfer it to the other system. i think it should be done by some
  commands such as dd but i don't know how to use it.
 
  please help me to edit my file.
  thanks in advance,
  SAM
 

 Use a decent hex editor or write a small C program to edit the file.

 -ayan


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: change specified byte in a hex file

2013-06-03 Thread Matthias Apitz
El día Monday, June 03, 2013 a las 11:19:24AM +0430, s m escribió:

 thanks Ayan,
 
 but isn't there any command in freebsd to do it for me??

There is chexedit in the ports.

matthias
-- 
Sent from my FreeBSD netbook

Matthias Apitz   |  - No system with backdoors like Apple/Android
E-mail: g...@unixarea.de |  - Never being an iSlave
WWW: http://www.unixarea.de/ |  - No proprietary attachments, no HTML/RTF in 
E-mail
phone: +49-170-4527211   |  - Respect for open standards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: change specified byte in a hex file

2013-06-03 Thread Arthur Chance

On 06/03/13 07:28, s m wrote:

i want to change a specified byte in a hex file. i want to edit my file and
change byte 0x28a content from 0x08 to 0x14.


Given your earlier posts about increasing the number of partitions from 
8 to 20 on a BSD labelled disk, this probably is not something you 
really want to do without further research to see if the label actually 
contains enough space for the metadata for 20 partitions. I believe it 
doesn't and you're liable to trash the file system on your 'a' partition 
if you just edit the byte. Alternatively newfs'ing your 'a' partition 
may destroy the metadata for partitions beyond 'h'. You really need to 
learn how to use gpart correctly, rather than randomly changing bytes on 
a disk.


However, there's nothing like burning your fingers playing with matches 
to teach you to respect fire, so ...



i try to do it with hex-editor in windows but this file is too big and i
can't transfer it to the other system. i think it should be done by some
commands such as dd but i don't know how to use it.


Of course it can be done by dd. Use man dd to find out how to use it, 
that's what the manual pages are for, and it's better to read for 
yourself than have someone give you an incantation you don't understand.


Hint: look at the bs= and seek= options.

Extra hint: *after* you've checked the potential problem I've mentioned 
in the first paragraph, you might also want to use man echo, man 
builtin, man sh and man csh to understand the differences between 
the various versions of echo you have available.


--
In the dungeons of Mordor, Sauron bred Orcs with LOLcats to create a
new race of servants. Called Uruk-Oh-Hai in the Black Speech, they
were cruel and delighted in torturing spelling and grammar.

_Lord of the Rings 2.0, the Web Edition_
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org