bvi二进制编辑工具

bbed可以查看和编辑dmp文件内容,而bvi工具也可以方便的修改dmp文件的内容,比vim灵活,用bbed或bvi看个人喜好。

先要下载包,我的linux版本是rhel5.6,下载对面的bvi包

http://www.rpmfind.net/linux/RPM/dag/redhat/el5/x86_64/bvi-1.3.2-1.el5.rf.x86_64.html

[root@qht115 rpm]# rpm -ivh bvi-1.3.2-1.el5.rf.x86_64.rpm 
warning: bvi-1.3.2-1.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:bvi                    ########################################### [100%]
[root@qht115 rpm]# 

具体操作如下:
1.从如下站点下载对应版本:
http://pkgs.repoforge.org/bvi/
我的机器是centos 6.2.下载如下版本:
 http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/bvi-1.3.2-1.el6.rf.x86_64.rpm

安装如下:
rpm -ivh bvi-1.3.2-1.el6.rf.x86_64.rpm

2.使用bvi如下:

如果编辑文件很大,直接bvi打开会非常慢.

仔细看了man文档,bvi支持如下参数:
-b begin
    causes bvi to load a file not from the start but from offset begin.

-e end
    causes bvi to load a file not till end but till address end.

-s size
    causes bvi not to load the complete file but only size bytes.


这样就ok了.

另外如果要改变文件大小,bvi文档如下:
Changing the length of data (insertion, deletion) moves the data to other addresses; this is bad for many cases (eg. databases, program files) and is thus disabled by default. You can enable this commands by typing
:set memmove

3.另外记录dmp文件,字符集转化要修改的位置.

AMERICAN_AMERICA.US7ASCII转化为SIMPLIFIED CHINESE_CHINA.ZHS16GBK

00000000  03 03 54 44 0A 45 58 50 4F 52 54 3A 56 31 30 2E 30 32 2E 30 31 0A 44 53 ..TD.EXPORT:V10.02.01.DS
             ~~~~
00000018  59 53 54 45 4D 0A 52 54 41 42 4C 45 53 0A 38 31 39 32 0A 30 0A 33 32 0A YSTEM.RTABLES.8192.0.32.
00000030  30 0A 03 54 03 54 07 D0 03 01 00 00 00 00 00 00 00 00 00 0B 00 20 20 20 0..T.T...............
                      ~~~~~
00000048  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00000060  20 20 20 20 20 20 20 20 20 20 46 72 69 20 4A 75 6C 20 36 20 31 30 3A 33           Fri Jul 6 10:3

注:下划线的内容00 01=> 03 54 .
 

你可能感兴趣的:(LINUX)