Print this page
2990 file(1) should have a -s flag to process special files
   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
  31 \fB/usr/bin/file\fR \fB-i\fR [\fB-h\fR] \fB-f\fR \fIffile\fR
  32 .fi
  33 
  34 .LP
  35 .nf
  36 \fB/usr/bin/file\fR \fB-c\fR [\fB-d\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR]
  37 .fi
  38 
  39 .LP
  40 .nf
  41 \fB/usr/xpg4/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  42 .fi
  43 
  44 .LP
  45 .nf
  46 \fB/usr/xpg4/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] \fB-f\fR \fIffile\fR
  47 .fi
  48 
  49 .LP
  50 .nf
  51 \fB/usr/xpg4/bin/file\fR \fB-i\fR [\fB-h\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  52 .fi
  53 
  54 .LP
  55 .nf
  56 \fB/usr/xpg4/bin/file\fR \fB-i\fR [\fB-h\fR] \fB-f\fR \fIffile\fR
  57 .fi
  58 
  59 .LP
  60 .nf
  61 \fB/usr/xpg4/bin/file\fR \fB-c\fR [\fB-d\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR]
  62 .fi
  63 
  64 .SH DESCRIPTION
  65 .sp
  66 .LP


 137 .na
 138 \fB\fB-h\fR\fR
 139 .ad
 140 .RS 12n
 141 When a symbolic link is encountered, this option identifies the file as a
 142 symbolic link. If \fB-h\fR is not specified and \fIfile\fR is a symbolic link
 143 that refers to a non-existent file, the \fBfile\fR utility identifies the file
 144 as a symbolic link, as if \fB-h\fR had been specified.
 145 .RE
 146 
 147 .sp
 148 .ne 2
 149 .na
 150 \fB\fB-i\fR\fR
 151 .ad
 152 .RS 12n
 153 If a file is a regular file, this option does not attempt to classify the type
 154 of file further, but identifies the file as a "regular file".
 155 .RE
 156 










 157 .sp
 158 .ne 2
 159 .na
 160 \fB\fB-m\fR \fImfile\fR\fR
 161 .ad
 162 .RS 12n
 163 .sp
 164 .ne 2
 165 .na
 166 \fB\fB/usr/bin/file\fR\fR
 167 .ad
 168 .RS 22n
 169 Uses \fImfile\fR as an alternate magic file, instead of \fB/etc/magic\fR.
 170 .RE
 171 
 172 .sp
 173 .ne 2
 174 .na
 175 \fB\fB/usr/xpg4/bin/file\fR\fR
 176 .ad


   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-dhs\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-dhs\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
  31 \fB/usr/bin/file\fR \fB-i\fR [\fB-h\fR] \fB-f\fR \fIffile\fR
  32 .fi
  33 
  34 .LP
  35 .nf
  36 \fB/usr/bin/file\fR \fB-c\fR [\fB-d\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR]
  37 .fi
  38 
  39 .LP
  40 .nf
  41 \fB/usr/xpg4/bin/file\fR [\fB-dhs\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  42 .fi
  43 
  44 .LP
  45 .nf
  46 \fB/usr/xpg4/bin/file\fR [\fB-das\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] \fB-f\fR \fIffile\fR
  47 .fi
  48 
  49 .LP
  50 .nf
  51 \fB/usr/xpg4/bin/file\fR \fB-i\fR [\fB-h\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
  52 .fi
  53 
  54 .LP
  55 .nf
  56 \fB/usr/xpg4/bin/file\fR \fB-i\fR [\fB-h\fR] \fB-f\fR \fIffile\fR
  57 .fi
  58 
  59 .LP
  60 .nf
  61 \fB/usr/xpg4/bin/file\fR \fB-c\fR [\fB-d\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR]
  62 .fi
  63 
  64 .SH DESCRIPTION
  65 .sp
  66 .LP


 137 .na
 138 \fB\fB-h\fR\fR
 139 .ad
 140 .RS 12n
 141 When a symbolic link is encountered, this option identifies the file as a
 142 symbolic link. If \fB-h\fR is not specified and \fIfile\fR is a symbolic link
 143 that refers to a non-existent file, the \fBfile\fR utility identifies the file
 144 as a symbolic link, as if \fB-h\fR had been specified.
 145 .RE
 146 
 147 .sp
 148 .ne 2
 149 .na
 150 \fB\fB-i\fR\fR
 151 .ad
 152 .RS 12n
 153 If a file is a regular file, this option does not attempt to classify the type
 154 of file further, but identifies the file as a "regular file".
 155 .RE
 156 
 157 .sp
 158 .ne 2
 159 .na
 160 \fB\fB-s\fR\fR
 161 .ad
 162 .RS 12n
 163 If a file is a block device or a character device, this option attempts to
 164 classify the contents of the device as if it were a regular file.
 165 .RE
 166 
 167 .sp
 168 .ne 2
 169 .na
 170 \fB\fB-m\fR \fImfile\fR\fR
 171 .ad
 172 .RS 12n
 173 .sp
 174 .ne 2
 175 .na
 176 \fB\fB/usr/bin/file\fR\fR
 177 .ad
 178 .RS 22n
 179 Uses \fImfile\fR as an alternate magic file, instead of \fB/etc/magic\fR.
 180 .RE
 181 
 182 .sp
 183 .ne 2
 184 .na
 185 \fB\fB/usr/xpg4/bin/file\fR\fR
 186 .ad