
FM(1) FM(1) NAME fm - curses-based hex file modifier/editor SYNOPSIS fm file where file = file to be examined/modified DESCRIPTION The fm utility allows direct examination and modification of files - be they text, binary, or device files. The modifications may be performed either in hex or ascii mode. The user will be interrogated before changes are written back to the file. The file is immediately updated with the changes if the response to the "apply changes" question is a 'y'. The screen presentation is similar to the output format of hd. Text searching may be specifed as ascii or hex strings. Regular expression searches are not provided. A file may be examined with (for example): fm my.file A device may be examined with (for example): fm /dev/fd096ds15 If the file/device cannot be opened in read/write mode, then fm will default into a read-only mode. The screen operation will use the cursor pad if available (i.e., if your termcap defines these operation and curses supports KEY_UP, KEY_DOWN, KEY_LEFT and KEY_RIGHT). Control key sequences are provided to select various fm options. If your termcap describes functions keys and if curses supports KEY_NPAGE, KEY_PPAGE, KEY_F(0) through KEY_F(10), the options may be selected with appropriate function keys. Text searches may be performed on ascii or hex strings. The form of text search is determined by whether you are currently pointing into the ascii or hex portion of the file. When searching for a hex string, the pattern is represented as normal characters with or without blank separation: 6b 36 fe 69a3 - 1 - Formatted: July 4, 2025 FM(1) FM(1) A search string may be repeated if the empty string is provided for the search string. The current screen contents (with an optional comment) may be printed to a file with the "^P" command. If the specified print file does not exist it is created; if it does exist, the screen print image is appended to the end of the file. Here are the keyboard bindings for fm commands: ^F / PgDn (Forward) next 256 byte block from file ^B / PgUp (Back) previous 256 byte block from file ^J / <down> cursor down ^K / <up> cursor up ^H / <left> cursor left ^M / <right> cursor right ^A / F1 toggle selection of ascii/hex editing ^X / F2 search for string ^U / F3 Undo current screen changes ^P / F4 Print screen to file ^G / F5 Goto byte location in file ^D / F6 Done (quit) ^L redraw screen SEE ALSO hd,termcap,curses AUTHORS D. Jason Penney (penney@slc.com) Tony Field. (uunet!ajfcal!tony) - 2 - Formatted: July 4, 2025