skyhighmac Posted May 29, 2007 Share Posted May 29, 2007 Does anyones know how I can edit this kind of file? Link to comment Share on other sites More sharing options...
lord_muad_dib Posted May 29, 2007 Share Posted May 29, 2007 if it's a bash script you just need a text editor, nano is ok if it's a binary you need an hex editor (at least) Link to comment Share on other sites More sharing options...
skyhighmac Posted May 29, 2007 Author Share Posted May 29, 2007 Thanks, I opened up the file in the hex editor, and it looked a little complicated for me. Thanks again. Link to comment Share on other sites More sharing options...
InsanelyStephanie Posted June 4, 2007 Share Posted June 4, 2007 Is it that you have a file which the system is listing as an "Unix executable file" and you don't know what it is? When you open it in the hex editor, what are the first 8 hexbytes? (Often the initial bytes in the file will identify what type of file it is... for instance, if you see RIFF its most likely an AVI container for video or audio.) Link to comment Share on other sites More sharing options...
The Mad Doctor Posted June 4, 2007 Share Posted June 4, 2007 Does anyones know how I can edit this kind of file? Um, you don't. You should tell us more about this file, but basically there are two things you can do: Find the source code for the executable, edit it, recompile; or use "sed" to fix minor problems. What am I talking about? sed is the stream editor that comes with unices. You can do some minor fixes with it like what I did some time ago. I had a file that was built to link to an older version of libstdc++. It wanted, but could not find, libstdc++-5 on my system. I had libstdc++-6. So I did something like this: sed -e 's@libstdc++-5@libstdc++-6@g' execfile > newexecfile Since the libraries to which an ELF (unix exec) file link are written in the file in ASCII, this substitution worked. Don't forget the "g" near the end of the sed command, since that means to replace all of the occurences, not just the first one. The executable ran just fine after that. Since I'm just showing off, you should probably just find the source code or contact the author of the program. Link to comment Share on other sites More sharing options...
Recommended Posts