forked from aburgh/bsdiff
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbsreplace.1
More file actions
48 lines (47 loc) · 1.44 KB
/
Copy pathbsreplace.1
File metadata and controls
48 lines (47 loc) · 1.44 KB
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
.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
.\"See Also:
.\"man mdoc.samples for a complete listing of options
.\"man mdoc for the short list of editing options
.\"/usr/share/misc/mdoc.template
.Dd 1/27/2012
.Dt bsreplace 1
.Os Darwin
.Sh NAME
.Nm bsreplace
.Nd Insert, overwrite, or find-and-replace bytes.
.Sh SYNOPSIS
.Nm
.Op Fl r \" allow resize
.Op Fl m \" allow multiple
.Op Fl i Ar offset bytes
.Op Fl s Ar offset bytes
.Op Fl f Ar old_bytes new_bytes
.Op Fl o Ar outfile
.Ar file
.Sh DESCRIPTION
Insert, overwrite, or find-and-replace bytes. By default, find-and-replace requires
the search bytes to be unique and the counts of the search and the replacement bytes
must be equal. Inserting implies the size will change; overwriting implies the
size will not change.
.Pp
A list of flags and their descriptions:
.Bl -tag -width -indent
.It Fl r
Allow resizing.
.It Fl m
Allow multiple occurrences to be be replaced.
.It Fl i Ar offset bytes
Inserts bytes at offset bytes from the beginning of the file.
.It Fl s Ar offset bytes
Substitute bytes beginning at the file offset with "bytes".
.It Fl f Ar old_bytes new_bytes
Find "old_bytes" and replace with "new_bytes".
.It Fl o Ar outfile
Write the output to outfile instead of overwriting the input file.
.El
.Pp
.Sh SEE ALSO
.Xr bsdiff 1 ,
.Xr bspatch 1
.\" .Sh BUGS
.\" .Sh HISTORY \" Document history if command behaves in a unique manner