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 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)