lsbom.8   [plain text]


.\""Copyright (c) 2001 Apple Computer, Inc. All Rights Reserved.
.\"The contents of this file constitute Original Code as defined in and are 
.\"subject to the Apple Public Source License Version 1.2 (the 'License'). 
.\"You may not use this file except in compliance with the
.\"License. Please obtain a copy of the License at 
.\"http://www.apple.com/publicsource and read it before using this file.
.\"
.\"This Original Code and all software distributed under the License are 
.\"distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
.\"EXPRESS OR IMPLIED, AND APPLE
.\"HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY 
.\"WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
.\"QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the 
.\"specific language governing rights and limitations under the License."
.Dd August 4, 2001
.Dt LSBOM 8 
.Os Mac OS X
.Sh NAME
.Nm lsbom
.Sh SYNOPSIS
.Nm
.Op Fl bcdflmsx
.Op Fl arch Ar archVal
.Op Fl p Ar parameters
bom ...
.Sh DESCRIPTION
The
.Nm
command interprets the contents of binary bom (bom(5))
files. For each file in a 
.Nm bom , 
.Nm
prints the file path and/or requested information.
.Pp
If no options are given, 
.Nm
will display the output formatted such that each line contains the path of the entry, its mode (octal), and its UID/GID. There are slight differences in the output for plain files, directories, symbolic links, and device files as follows:
.Pp
.Bl -tag -width "symbolic links" -indent
.It plain files 
the UID/GID is followed by the file size and a 32-bit CRC checksum of the file's contents.
.It symbolic links
the UID/GID is followed by the size and checksum of the link path, and the link path itself.
.It device files
the UID/GID file number is followed by the device number.
.El
.Pp
The 
.Fl p
option can be used to specify a user-defined format for
.Nm lsbom's
output. The format string consists of one or more characters described below where each character represents a datatype. Datatypes wil be separated by tab characters, and each line will end with a newline character. One can use this mechanism to create output similar to the 
.Xr ls 1
command.
.Pp
The options are:
.Bl -tag -width -indent
.It Fl b
list block devices
.It Fl c
list character devices
.It Fl d
list directories
.It Fl f
list files
.It Fl l
list symbolic links
.It Fl m
print modified times (for plain files only)
.It Fl s
print only the path of each file
.It Fl x 
suppress modes for directories and symlinks
.It Fl arch Ar archVal
when displaying plain files that represent fat mach-o binaries, print the size and checksum of the file contents for the specified archVal (either "ppc" or i386")
.It Fl p Ar parameters
print only some of the results
.Nm Note:
each option can only be used once
.Bl -tag -compact -width -indent
.It c
32-bit checksum
.It f
file name
.It F
file name with quotes (ie "/usr/bin/lsbom")
.It g
group id
.It G
group name
.It m
file mode (permissions)
.It M
symbolic file mode (ie "dr-xr-xr-x")
.It s
file size
.It S
formatted size
.It t
mod time
.It T
formatted mod time
.It u
user id
.It U
user name
.It /
user id/group id
.It ?
user name/group name
.El
.El
.Sh EXAMPLES
.Bl -tag -width "lsbom -p MUGsf bomfile" -indent
.It lsbom bomfile
list the contents of bomfile
.It lsbom -s bomfile
list only the paths of the contents of the bomfile
.It lsbom -f -l bomfile
list the plain files and symbolic links of the bomfiles (but not directories or devices)
.It lsbom -p MUGsf bomfiles
list the contents of bomfile displaying only the files' modes, user name, group name, size, and filename
.El
.Sh SEE ALSO 
.Xr bom 5 , 
.Xr ditto 8 ,
.Xr mkbom 8 
.Sh BUGS 
.Nm
will not read bom files generated on operating systems prior to Mac OS X.
.Sh HISTORY 
The
.Nm
command appeared in NeXTSTEP as a tool to browse the contents of bom files used during installation.
.Pp
The 
.Fl p
flag appeared in Mac OS X 10.1 in an attempt to make lsbom's output more convenient for human beings.