Print this page
4023 - Typo in file(1) manpage and various others
   1 '\" te
   2 .\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
   3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   4 .\" http://www.opengroup.org/bookstore/.
   5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   6 .\"  This notice shall appear on any product containing this material.
   7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  10 .TH FILE 1 "May 15, 2006"
  11 .SH NAME
  12 file \- determine file type
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 \fB/usr/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  17 .fi
  18 
  19 .LP
  20 .nf
  21 \fB/usr/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] \fB-f\fR \fIffile\fR
  22 .fi
  23 
  24 .LP
  25 .nf
  26 \fB/usr/bin/file\fR \fB-i\fR [\fB-h\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  27 .fi
  28 
  29 .LP
  30 .nf


 214 .RS 8n
 215 A path name of a file to be tested.
 216 .RE
 217 
 218 .SH USAGE
 219 .sp
 220 .LP
 221 See \fBlargefile\fR(5) for the description of the behavior of \fBfile\fR when
 222 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
 223 .SH EXAMPLES
 224 .LP
 225 \fBExample 1 \fRDetermining if an Argument is a Binary Executable Files
 226 .sp
 227 .LP
 228 The following example determine if an argument is a binary executable file:
 229 
 230 .sp
 231 .in +2
 232 .nf
 233 file "$1" | grep \(miFq executable &&
 234           printf "%s is executable.\n" "$1"
 235 .fi
 236 .in -2
 237 .sp
 238 
 239 .SH ENVIRONMENT VARIABLES
 240 .sp
 241 .LP
 242 See \fBenviron\fR(5) for descriptions of the following environment variables
 243 that affect the execution of \fBfile\fR: \fBLANG\fR, \fBLC_ALL\fR,
 244 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 245 .SH EXIT STATUS
 246 .sp
 247 .LP
 248 The following exit values are returned:
 249 .sp
 250 .ne 2
 251 .na
 252 \fB\fB0\fR\fR
 253 .ad
 254 .RS 6n


   1 '\" te
   2 .\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
   3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   4 .\" http://www.opengroup.org/bookstore/.
   5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   6 .\"  This notice shall appear on any product containing this material.
   7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  10 .TH FILE 1 "Sep 10, 2013"
  11 .SH NAME
  12 file \- determine file type
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 \fB/usr/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  17 .fi
  18 
  19 .LP
  20 .nf
  21 \fB/usr/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] \fB-f\fR \fIffile\fR
  22 .fi
  23 
  24 .LP
  25 .nf
  26 \fB/usr/bin/file\fR \fB-i\fR [\fB-h\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  27 .fi
  28 
  29 .LP
  30 .nf


 214 .RS 8n
 215 A path name of a file to be tested.
 216 .RE
 217 
 218 .SH USAGE
 219 .sp
 220 .LP
 221 See \fBlargefile\fR(5) for the description of the behavior of \fBfile\fR when
 222 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
 223 .SH EXAMPLES
 224 .LP
 225 \fBExample 1 \fRDetermining if an Argument is a Binary Executable Files
 226 .sp
 227 .LP
 228 The following example determine if an argument is a binary executable file:
 229 
 230 .sp
 231 .in +2
 232 .nf
 233 file "$1" | grep \(miFq executable &&
 234           printf "%s is executable.\en" "$1"
 235 .fi
 236 .in -2
 237 .sp
 238 
 239 .SH ENVIRONMENT VARIABLES
 240 .sp
 241 .LP
 242 See \fBenviron\fR(5) for descriptions of the following environment variables
 243 that affect the execution of \fBfile\fR: \fBLANG\fR, \fBLC_ALL\fR,
 244 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 245 .SH EXIT STATUS
 246 .sp
 247 .LP
 248 The following exit values are returned:
 249 .sp
 250 .ne 2
 251 .na
 252 \fB\fB0\fR\fR
 253 .ad
 254 .RS 6n