Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

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

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
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288

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

Old 11-07-2013, 01:28 AM   #3
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

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