1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
xed(1) xed(1)
NAME
xed - CURSES based hex/ASCII file editor
SYNOPSIS
xed [ -x ] [ -i ] [ -r ] [ -c ] [ -R ] filename
DESCRIPTION
xed edits filename allowing individual bytes to be altered, either as
hex or as ASCII.
OPTIONS
xed accepts these switches
-x Edit the file directly, rather than a memory based copy. Cer-
tain commands are disabled if this switch is provided (see
USAGE).
-i Start off in insert mode.
-r Start off in regular expression search mode.
-c Start off in case insensitive search mode.
-R Switch on read only mode (note this mode cannot be toggled
whilst in xed ).
USAGE
xed is a simple hex and ASCII based file editor. The display is made
up of a banner, which describes the file being editted; the size of the
file (in hex); the cursor position within the file (in hex); whether
you are operating in overtype or insert mode; whether you are in simple
string or regular expression search mode and the case sensitivity of
the search.
Below the banner is the editting area, with the file offset and hex
listing on the left, and the ASCII on the right.
xed operates within two modes when editting; hex and ASCII. Below are
the key commands valid in each mode. Note that all the editting, sav-
ing and undo keys are ignored in read-only mode.
HEX MODE
Cursors keys
Move around file
h j k l
As above
< , ^B Move back one page
> . ^F Move forward one page
s Save file (not valid in -x mode)
TAB Switch to ASCII mode
$ Move to the end of the file
^ Move to the beginning of the file
+ Jump to a specified address (Note this address defaults to dec-
imal, but an hex address can be entered by prefixing the number
with '0x', and an octal address by prefixing with '0')
R Restore byte from last saved/initial version (not valid in -x
mode)
q Q ^C Quit
1-9 a-f A-F
Enter Hex value
^A Switch between overtype/insert (not valid in -x mode)
^T Switch between normal/regular expression search mode
^K Switch between case sensitive/insensitive search mode
BS DEL Cancel after first hex digit is entered
x Delete character at cursor (not valid in -x mode)
/ Search. In regular expression mode this will treat the file as
a set of text lines, each line terminated with a newline or
NULL.
n Search next. Note that this will perform the last search,
regardless of any mode change to/from regular expression mode,
though it will take account of changes to case sensitivity.
^R Redraw screen
ASCII MODE
Cursor keys
Move around file
^H ^J ^K ^L
As above
^B Move back one page
^F Move forward one page
TAB Switch to HEX mode
^A Switch between overtype/insert (not valid in -x mode)
^X Delete character at cursor (not valid in -x mode)
^R Redraw screen
^C Quit
ENVIRONMENT
xed will process these environment variables if present
XEDARG Allows default arguments to be definied in the environment. If
this is set then invoking xed will be the same as invoking xed
$XEDARG <arglist>
SEE ALSO
od(1) grep(1) curses(3) regexp(3)
DIAGNOSTICS
The diagnostics produced by xed are intended to be self-explanatory.
NOTES
Version 2.1 of xed includes these additions and fixes over 2.0 :
o Added missing include for unistd.h -- FreeBSD didn't mind, cyg-
win did.
BUGS
o Even though the input routine tries it's best to mask them,
pressing certain control keys (function keys, etc) while xed is
waiting for the second hex digit when editting can send a string
of unexpected commands to xed. This may result in your file
being accidentally editted and saved.
o The display is half-inverted and sometimes corrupts on some HP-
UX systems. This is a bug in their curses implementation.
xed(1)
|