Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
bpatch(1)		     General Commands Manual		       bpatch(1)

NAME
     bpatch - binary patch and dump file utility

SYNOPSIS
     bpatch  [	-b blksize ] [ -d ] [ -D pagecnt ] [ -e ] [ -p ] [ -r reclen ] [
     -s ] [ -x ] file...

DESCRIPTION
     Bpatch allows the viewing and/or modification of files, independent of file
     type (text, executable, data file, and so forth).	Bpatch allows  the  data
     to either be examined at the terminal, dumped to a print device or file, or
     edited  in  the general manner of vi(1).  The data in the file is dumped or
     displayed in pages of 256 bytes.

   Options
     -b blksize  The -b option specifies the blocksize of the data  file.   This
		 is  used  primarily with tapes, and is allowed only with one of
		 the dump (-d or -D) options.  When this  option  is  specified,
		 the file is opened in readonly mode.

     -d 	 The  -d option indicates that a dump (no terminal manipulation)
		 is to be performed.  The entire file will be dumped to standard
		 output.  No editing of the data is  allowed  and  the	file  is
		 opened  in  readonly  mode.  <DEL> interrupts a continuous dis-
		 play, producing a pause after the current record is  displayed;
		 at this point, a second <DEL> exits and and other character be-
		 gins display of the next file.

     -D pagecnt  The  -D  option is similar to the -d option, with the following
		 exception: the pagecnt argument limits the dump to  the  speci-
		 fied number of pages.

     -e 	 The  -e option indicates that the file contains EBCDIC data and
		 should be converted in the character portion of the dump.

     -p 	 Used with one of the dump options, this option causes the  pro-
		 gram  to  pause  between pages.  The program will then wait for
		 the user to press either the return key to continue, or the DEL
		 (or rubout) key to stop the dump.

     -r reclen	 The -r option indicates the record length of  the  data  within
		 the dump.  When specified, this option causes bpatch to place a
		 colon	(:)  between  the  last byte of one record and the first
		 byte of the next.

     -s 	 This option turns on the byte swap option.  It may  be  toggled
		 dynamically during execution (see -x under Commands below).

     -x 	 This  option  specifies  the  suppression of pages that contain
		 only NUL characters.  The result is that only the  page  header
		 (name	and  page number) will appear for such a page.	This op-
		 tion may only be used with one of the dump options.

   Arguments
     file	 Any number of files may be specified.

   Commands
     All commands are valid only in the non-dump,  interactive	mode.	Commands
     may  be  entered  in either upper or lower case.  Commands of the form '^x'
     indicate that the control character x is to be entered.

     All commands that request movement within a file or between files cannot be
     executed if any changes have been made.  To proceed in this case, the  user
     must either enter the w command, the u command, or the r command.

     Requesting a next or previous file when there is no such will cause the is-
     suance of an error message.

     Note that certain commands allow/require either some text or numeric value.
     In  those cases, the user should type in characters and end the string with
     either a <cr> or <DEL>.

     ?	   Display the help screen.  The help screen will remain until the  user
	   either redraws the screen (see ^r) or changes pages or files.

     !	   Execute the following command in the shell.

     backslash
	   Display the previous page.

     <cr>  Display the next page.

     DEL   Quit the program if no changes have been made.

     /	   This command initiates an ASCII search.  The text entered on the com-
	   mand  line  will  be  used  as  a search string, and the file will be
	   searched starting with the current page.  When the string  is  found,
	   the	page  containing the string will be displayed.	If the string is
	   not found, an apapropriate message will be displayed.

     ^f    Open a named file whose name will be entered on the command line  and
	   followed either by <cr> or DEL.

     ^n    Open the next file and display the first page.

     ^p    Open the previous file and display the first page.

     ^q    Quit without writing current changes.

     ^r    Redraw the screen.

     NNN   Entering  a	numeric  value	requests that the specified page be dis-
	   played.

     -x    Toggle the command line option represented by x:

		 a     Toggle display to ascii (assume data is ascii).

		 e     Toggle display to dbcdic (assume data is ebcdic).

		 s     Toggle byte swap.

     a	   Edit the ASCII display.  End edits by  pressing  the  DEL  key.   All
	   other  characters  will  be	treated as valid input.  Cursor movement
	   keys (arrows and home) allow movement within the edit  window.   Non-
	   printing characters are displayed as dot (.) in this window.

     f	   Display the first page in the current file.

     g	   Display  the  page containing the byte address typed in following the
	   command.

     h	   Edit the HEXADECIMAL display.  End edits by pressing DEL key.  Cursor
	   movement keys (arrows and home) allow movement within the  edit  win-
	   dow.   Two keystrokes are required to modify a byte, and both must be
	   valid hexadecimal values (0-9 and a-f).  To	cancel	a  change  after
	   typing one character, press DEL.

     l	   Display the last page in the current file.

     q	   Quit  the  file.   A  warning will be issued if any changes have been
	   made but not written out.

     r	   Reread the current page.

     u	   Undo all changes to the current page.

     w	   Write out the current page.

SEE ALSO
     od(1)

4th Berkeley Distribution	 Benetics Local 		       bpatch(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=bpatch&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help