Unix Technical Forum

Changing the file size of a binary

This is a discussion on Changing the file size of a binary within the comp.unix.solaris forums, part of the Solaris Operating System category; --> "Double Dumbass on You" <spam_me_gently_with_a_chainsaw@yahoo.com> writes: > >"jacking the whole file up" as in you add one character to ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 01-06-2008, 01:33 PM
Greg Andrews
 
Posts: n/a
Default Re: Changing the file size of a binary

"Double Dumbass on You" <spam_me_gently_with_a_chainsaw@yahoo.com> writes:
>
>"jacking the whole file up" as in you add one character to the binary and
>then instead of being 19564 bytes, it's 6421.
>


How could I possibly have understood that from the phrase
"jacking the whole file up?"

If adding a byte to the file makes a change of more than a single
byte to the file, then you are obviously not using the correct
utility to change the file.

-Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 01-06-2008, 01:33 PM
Darren Dunham
 
Posts: n/a
Default Re: Changing the file size of a binary

Double Dumbass on You <spam_me_gently_with_a_chainsaw@yahoo.com> wrote:
> Yeah, I didn't get it either. I opened the binary /etc/scsi with vi, added
> 'A' as the first character, saved the file, and the size was vastly
> different.


vi isn't a binary editor.

Try 'cat' instead.

--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 01-06-2008, 01:33 PM
Greg Andrews
 
Posts: n/a
Default Re: Changing the file size of a binary

"Double Dumbass on You" <spam_me_gently_with_a_chainsaw@yahoo.com> writes:
>
>Yeah, I didn't get it either. I opened the binary /etc/scsi with vi, added
>'A' as the first character, saved the file, and the size was vastly
>different.
>


This is the problem: you're using the wrong tool to modify the file.
Vi is a editor for *text* files, not binary files. As you've seen,
it does completely wrong things when you ask it to edit files that
aren't text, like a binary file.

Instead, use one of the binary editors that can be found in numerous
places on the Internet. For example, www.sunfreeware.com.

-Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 01-06-2008, 01:42 PM
Tony Walton
 
Posts: n/a
Default Re: Changing the file size of a binary

Double Dumbass on You wrote:

>
> Though I am a die-hard patriot of the USA, I think foreign languages have
> some superior points.


Heh!

--
Tony

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:20 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com