1 .TH HEXEDIT 1 "12 July 1998"
3 hexedit \- view and edit files in hexadecimal or in ASCII
6 [\-s | \-\-sector] [\-m | \-\-maximize] [\-h | \-\-help] [filename]
10 shows a file both in ASCII and in hexadecimal. The file can be a device
11 as the file is read a piece at a time. You can modify the file and search through it.
15 Format the display to have entire sectors.
17 .I "\-m, \-\-maximize"
18 Try to maximize the display.
22 .SH COMMANDS (quickly)
25 <, > : go to start/end of the file
27 Left: previous character
30 Home: beginning of line
43 Ctrl-C: exit without saving
47 Backspace: undo previous character
49 Ctrl-S: search forward
50 Ctrl-R: search backward
57 Esc-Y: paste into a file
60 .SH COMMANDS (full and detailed)
61 o \fIRight-Arrow\fR, \fILeft-Arrow\fR, \fIDown-Arrow\fR, \fIUp-Arrow\fR \- move the cursor.
63 o \fICtrl+F\fR, \fICtrl+B\fR, \fICtrl+N\fR, \fICtrl+P\fR \- move the cursor.
65 o \fICtrl+Right-Arrow\fR, \fICtrl+Left-Arrow\fR, \fICtrl+Down-Arrow\fR, \fICtrl+Up-Arrow\fR \- move n times the cursor.
67 o \fIEsc+Right-Arrow\fR, \fIEsc+Left-Arrow\fR, \fIEsc+Down-Arrow\fR, \fIEsc+Up-Arrow\fR \- move n times the cursor.
69 o \fIEsc+F\fR, \fIEsc+B\fR, \fIEsc+N\fR, \fIEsc+P\fR \- move n times the cursor.
71 o \fIHome\fR, \fICtrl+A\fR \- go the beginning of the line.
73 o \fIEnd\fR, \fICtrl+E\fR \- go to the end of the line.
75 o \fIPage up\fR, \fIEsc+V\fR, \fIF5\fR \- go up in the file by one page.
77 o \fIPage down\fR, \fICtrl+V\fR, \fIF6\fR \- go down in the file by one page.
79 o \fI<\fR, \fIEsc+<\fR, \fIEsc+Home\fR \- go to the beginning of the file.
81 o \fI>\fR, \fIEsc+>\fR, \fIEsc+End\fR \- go to the end of the file (for regular files that have a size).
83 o \fICtrl+Z\fR \- suspend hexedit.
85 o \fICtrl+U\fR, \fICtrl+_\fR, \fICtrl+/\fR \- undo all (forget the modifications).
87 o \fICtrl+Q\fR \- read next input character and insert it (this is useful for
88 inserting control characters and bound keys).
90 o \fITab\fR, \fICtrl+T\fR \- toggle between ASCII and hexadecimal.
92 o \fI/\fR, \fICtrl+S\fR \- search forward (in ASCII or in hexadecimal, use \fITAB\fR to change).
94 o \fICtrl+R\fR \- search backward.
96 o \fICtrl+G\fR, \fIF4\fR \- go to a position in the file.
98 o \fIReturn\fR \- go to a sector in the file if \fI\-\-sector\fR is used, otherwise go
99 to a position in the file.
101 o \fIEsc+L\fR \- display the page starting at the current cursor position.
103 o \fIF2\fR, \fICtrl+W\fR \- save the modifications.
105 o \fIF1\fR, \fIEsc+H\fR \- help (show the man page).
107 o \fICtrl+O\fR, \fIF3\fR \- open another file
109 o \fICtrl+L\fR \- redisplay (refresh) the display (usefull when your terminal screws up).
111 o \fIBackspace\fR, \fICtrl+H\fR \- undo the modifications made on the previous byte.
113 o \fIEsc+Ctrl+H\fR \- undo the modifications made on the previous bytes.
115 o \fICtrl+Space\fR, \fIF9\fR \- set mark where cursor is.
117 o \fIEsc+W\fR, \fIDelete\fR, \fIF7\fR \- copy selected region.
119 o \fICtrl+Y\fR, \fIInsert\fR, \fIF8\fR \- paste (yank) previously copied region.
121 o \fIEsc+Y\fR, \fIF11\fR \- save previously copied region to a file.
123 o \fIEsc+I\fR, \fIF12\fR \- fill the selection with a string
125 o \fIEsc+T\fR \- truncate the file at the current location
127 o \fICtrl+C\fR \- unconditional quit (without saving).
129 o \fIF10\fR, \fICtrl+X\fR \- quit.
131 For the \fIEsc\fR commands, it sometimes works to use \fIAlt\fR instead of
132 \fIEsc\fR. Funny things here (especially for froggies :) egrave = Alt+H ,
133 ccedilla = Alt+G, Alt+Y = ugrave.
136 At the bottom of the display you have the modeline (copied from emacs). As in
137 emacs, you have the indications --, ** and %% meaning unmodified, modified and
138 read-only. Then you have the name of the file you're currently editing. Next to
139 it is the current position of the cursor in the file followed by the total file
140 size. The total file size isn't quite correct for devices.
142 While in --sector mode, it shows the sector the cursor is in.
144 You can edit in ASCII or in hexadecimal. You can switch between the two with
145 \fITab\fR. When the file is read-only, you can't edit it. When trying to edit a
146 read-only file, a message (``File is read-only'') tells you it is non-writable.
148 The modifications are shown in bold until they are saved.
149 The modeline indicates whether you have modified the file or not.
151 When editing in hexadecimal, only \fI0\fR,\fI1\fR,...,\fI9\fR,
152 \fIa\fR,\fIb\fR,...,\fIf\fR, \fIA\fR,\fIB\fR,...\fIF\fR are legal.
153 Other keys are unbound. The first time you hit an unbound key, the help pops up.
154 It won't pop again unless you call the help directly (with \fIF1\fR).
156 When editing in ascii, you can find it difficult to enter characters like
157 \fI/\fR which are bound to a function. The solution is to use the quoted insert
158 function \fICtrl+Q\fR, the key after the quoted insert function is not processed
159 by \fIhexedit\fR (like emacs' quoted-insert, or like the \\ character in C).
161 You can search for a string in ASCII or in hexadecimal. You can switch
162 between the two with \fITab\fR. If the string is found, the cursor is moved to
163 the beginning of the matching location. If the search failed, a message (``not
164 found'') tells you so. You can cancel the search by pressing a key.
166 The search in hexadecimal is a bit confusing. You must give a hexadecimal string
167 with an even number of characters. The search can then be done byte by byte. If
168 you want to search a long number (eg: a 32 bit number), you must know the
169 internal representation of that number (little/big endian problem) and give it
170 the way it is in memory. For example, on an Intel processor (little endian), you
171 must swap every bytes: 0x12345678 is written 0x78563412 in memory and that's the
172 string you must give to the search engine.
174 Before searching you are asked if you want to save the changes, if the file is
176 .SS Selecting, copying, pasting, filling
177 First, select the part of the buffer you want to copy: start setting the mark
178 where you want. Then go to the end of the area you want to copy (you can use the
179 go to function and the search functions). Then copy it. You can then paste the
180 copied area in the current file or in another file.
182 You can also fill the selected area with a string or a character: start choosing
183 the block you want to fill in (set mark then move to the end of the block), and
184 call the fill function (\fIF12\fR). \fIhexedit\fR ask you the string you want to
187 The code is not tuned for huge filling as it keeps the modifications in memory
188 until you save them. That's why \fIhexedit\fR will warn you if you try to fill
191 When the mark is set, the selection is shown in reverse mode.
193 Be aware that the copied area contains the modifications done at the time of the
194 copy. But if you undo the modifications, it does not change the content of the
195 copy buffer. It seems obvious but it's worth saying.
197 The scrolling is different whether you are in \fI\-\-sector\fR mode or not. In
198 normal mode, the scrolling is line by line. In sector mode, the scrolling is
199 sector by sector. In both modes, you can force the display to start at a given
200 position using \fIEsc+L\fR.
202 od(1), hdump(1), hexdump(1), bpe(1), hexed(1), beav(1).
204 Pixel (Pascal Rigaux) <pixel@merd.net>,
206 Home page is <http://merd.net/pixel/>.
209 is Open Source; anyone may redistribute copies of
212 anyone under the terms stated in the GNU General Public License.
218 <http://merd.net/pixel/hexedit-1.2.12.src.tgz> and
220 <http://merd.net/pixel/hexedit-1.2.12.bin.i386.dynamic.tgz>.
222 Anything you think could be nice...
224 There are problems with the curses library given with Redhat 5.0 that make
225 \fIhexedit\fR think the terminal is huge. The result is that hexedit is
228 The shortcuts work on some machines, and not on others. That's why there are
229 many shortcuts for each function. The Ctrl+Arrows and the Alt+. do not work
230 work as they should most of the time. On SUNs, you must do Ctrl+V-Ctrl+V instead
231 of Ctrl+V (!); and the Alt key is the diamond one.
233 While searching, it could be interesting to know which position the search has
234 reached. It's always nice to see something moving to help waiting.
236 The hexadecimal search could be able to search modulo 4 bits instead of 8 bits.
237 Another feature could be to complete padd odd length hexadecimal searches with
240 I have an example where the display is completly screwed up. It seems to be a
241 bug in ncurses (or maybe in xterm and rxvt)?? Don't know if it's me using
242 ncurses badly or not... It seems to happen when \fIhexedit\fR leaves only one
243 space at the end of the lines... If anyone has a (or the) solution, please tell
246 If you have any problem with the program (even a small one), please do report it
247 to me. Remarks of any kind are also welcome.