LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-07-2013, 01:06 AM   #1
bvdyi
LQ Newbie
 
Registered: Feb 2012
Posts: 14

Rep: Reputation: Disabled
Smile how to modify binary file by using combination command (dd, hexdump, sed, ...)???


hello:
I want to modify a binary file by using command, not open it in hex mode in vim.

I can use "xxd" to accomplish it on PC.
but now I want to reach this on my board, and my system doesn't have "xxd".
I have tried some combination commands, (dd, hexdump, sed, grep,...),
however it's all failed.

so, does any one know how to commands these commands(dd, hexdump, sed, grep,...or others) to accomplish my aim?? could you teach me?
any advice will be very appreciate!!thank you very much~~

ex: binary file as below: I just want to modify the red color words...
0000010: EA34 BE98 4930 3928 09EC 8903 90DB BAE2
0000020: xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
0000030: xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
0000040: xxxx 5490 34F4 76ED DDA2 xxxx xxxx xxxx
 
Old 11-07-2013, 01:17 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

have you tried using a standard search and replace with sed? Was there some problem?

Evo2.
 
Old 11-07-2013, 01:28 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Moved: modifying Linux binaries in this way is not a Linux Security topic, so in line with your post count this thread was moved to the Newbie forum to help your thread/question get the exposure it deserves.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] using sed to modify a file and name expansion forethinker Linux - Newbie 7 03-20-2012 03:34 AM
how to modify xml file using sed/awk akhand jyoti Linux - Newbie 3 11-29-2011 02:47 PM
[SOLVED] Using sed to modify command output brianmcgee Programming 7 06-14-2010 07:49 AM
modify a file that contains \\ using sed or awk j-me Linux - Newbie 7 05-14-2010 08:30 AM
[SOLVED] Bash Script combination of sed with pwd command escaping slashes HaukeG Programming 2 10-06-2009 04:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration