xref: /dragonfly/usr.sbin/fstyp/fstyp.8 (revision cc05af1e)
1551c4c36STomohiro Kusumi.\" Copyright (c) 2016 The DragonFly Project
2551c4c36STomohiro Kusumi.\" Copyright (c) 2014 The FreeBSD Foundation
3551c4c36STomohiro Kusumi.\" All rights reserved.
4551c4c36STomohiro Kusumi.\"
5551c4c36STomohiro Kusumi.\" This software was developed by Edward Tomasz Napierala under sponsorship
6551c4c36STomohiro Kusumi.\" from the FreeBSD Foundation.
7551c4c36STomohiro Kusumi.\"
8551c4c36STomohiro Kusumi.\" Redistribution and use in source and binary forms, with or without
9551c4c36STomohiro Kusumi.\" modification, are permitted provided that the following conditions
10551c4c36STomohiro Kusumi.\" are met:
11551c4c36STomohiro Kusumi.\" 1. Redistributions of source code must retain the above copyright
12551c4c36STomohiro Kusumi.\"    notice, this list of conditions and the following disclaimer.
13551c4c36STomohiro Kusumi.\" 2. Redistributions in binary form must reproduce the above copyright
14551c4c36STomohiro Kusumi.\"    notice, this list of conditions and the following disclaimer in the
15551c4c36STomohiro Kusumi.\"    documentation and/or other materials provided with the distribution.
16551c4c36STomohiro Kusumi.\"
17551c4c36STomohiro Kusumi.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
18551c4c36STomohiro Kusumi.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19551c4c36STomohiro Kusumi.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20551c4c36STomohiro Kusumi.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
21551c4c36STomohiro Kusumi.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22551c4c36STomohiro Kusumi.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23551c4c36STomohiro Kusumi.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24551c4c36STomohiro Kusumi.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25551c4c36STomohiro Kusumi.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26551c4c36STomohiro Kusumi.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27551c4c36STomohiro Kusumi.\" SUCH DAMAGE.
28551c4c36STomohiro Kusumi.\"
29551c4c36STomohiro Kusumi.\" $FreeBSD$
30551c4c36STomohiro Kusumi.\"
31551c4c36STomohiro Kusumi.Dd April 14, 2016
32551c4c36STomohiro Kusumi.Dt FSTYP 8
33551c4c36STomohiro Kusumi.Os
34551c4c36STomohiro Kusumi.Sh NAME
35551c4c36STomohiro Kusumi.Nm fstyp
36551c4c36STomohiro Kusumi.Nd determine filesystem type
37551c4c36STomohiro Kusumi.Sh SYNOPSIS
38551c4c36STomohiro Kusumi.Nm
39551c4c36STomohiro Kusumi.Op Fl l
40551c4c36STomohiro Kusumi.Op Fl s
41551c4c36STomohiro Kusumi.Op Fl u
42551c4c36STomohiro Kusumi.Ar special
43551c4c36STomohiro Kusumi.Sh DESCRIPTION
44551c4c36STomohiro KusumiThe
45551c4c36STomohiro Kusumi.Nm
46551c4c36STomohiro Kusumiutility is used to determine the filesystem type on a given device.
47551c4c36STomohiro KusumiIt can recognize ISO-9660, Ext2, FAT, NTFS, UFS, and HAMMER filesystems.
48551c4c36STomohiro KusumiWhen the
49551c4c36STomohiro Kusumi.Fl u
50551c4c36STomohiro Kusumiflag is specified,
51551c4c36STomohiro Kusumi.Nm
52551c4c36STomohiro Kusumialso recognizes certain additional metadata formats that cannot be
53551c4c36STomohiro Kusumihandled using
54551c4c36STomohiro Kusumi.Xr mount 8 .
55551c4c36STomohiro Kusumi.Pp
56551c4c36STomohiro KusumiThe filesystem name is printed to the standard output
57551c4c36STomohiro Kusumias, respectively:
58551c4c36STomohiro Kusumi.Bl -item -offset indent -compact
59551c4c36STomohiro Kusumi.It
60551c4c36STomohiro Kusumicd9660
61551c4c36STomohiro Kusumi.It
62551c4c36STomohiro Kusumiext2fs
63551c4c36STomohiro Kusumi.It
64551c4c36STomohiro Kusumimsdosfs
65551c4c36STomohiro Kusumi.It
66551c4c36STomohiro Kusumintfs
67551c4c36STomohiro Kusumi.It
68551c4c36STomohiro Kusumiufs
69551c4c36STomohiro Kusumi.It
70551c4c36STomohiro Kusumihammer
71551c4c36STomohiro Kusumi.El
72551c4c36STomohiro Kusumi.Pp
73551c4c36STomohiro KusumiNote that HAMMER filesystem consists of more than one volumes requires a path in blkdevs format.
74551c4c36STomohiro KusumiSee
75551c4c36STomohiro Kusumi.Xr hammer 8
76551c4c36STomohiro Kusumifor blkdevs format.
77551c4c36STomohiro Kusumi.Nm
78551c4c36STomohiro Kusumidoesn't recognize partially specified block devices as HAMMER filesystem volumes unless
79551c4c36STomohiro Kusumi.Fl u
80551c4c36STomohiro Kusumiflag is specified.
81551c4c36STomohiro Kusumi.Pp
82551c4c36STomohiro KusumiBecause
83551c4c36STomohiro Kusumi.Nm
84551c4c36STomohiro Kusumiis built specifically to detect filesystem types, it differs from
85551c4c36STomohiro Kusumi.Xr file 1
86551c4c36STomohiro Kusumiin several ways.
87551c4c36STomohiro KusumiThe output is machine-parsable, filesystem labels are supported,
88551c4c36STomohiro Kusumiand does not try to recognize any file format other than filesystems.
89551c4c36STomohiro Kusumi.Pp
90551c4c36STomohiro KusumiThese options are available:
91551c4c36STomohiro Kusumi.Bl -tag -width ".Fl l"
92551c4c36STomohiro Kusumi.It Fl l
93551c4c36STomohiro KusumiIn addition to filesystem type, print filesystem label if available.
94551c4c36STomohiro Kusumi.It Fl s
95551c4c36STomohiro KusumiIgnore file type.
96551c4c36STomohiro KusumiBy default,
97551c4c36STomohiro Kusumi.Nm
98551c4c36STomohiro Kusumionly works on regular files and disk-like device nodes.
99551c4c36STomohiro KusumiTrying to read other file types might have unexpected consequences or hang
100551c4c36STomohiro Kusumiindefinitely.
101551c4c36STomohiro Kusumi.It Fl u
102551c4c36STomohiro KusumiInclude filesystems and devices that cannot be mounted directly by
103551c4c36STomohiro Kusumi.Xr mount 8 .
104551c4c36STomohiro Kusumi.El
105551c4c36STomohiro Kusumi.Sh EXIT STATUS
106551c4c36STomohiro KusumiThe
107551c4c36STomohiro Kusumi.Nm
108551c4c36STomohiro Kusumiutility exits 0 on success, and >0 if an error occurs or the filesystem
109551c4c36STomohiro Kusumitype is not recognized.
110551c4c36STomohiro Kusumi.Sh SEE ALSO
111551c4c36STomohiro Kusumi.Xr file 1 ,
112551c4c36STomohiro Kusumi.Xr autofs 5 ,
11371990c18SSascha Wildner.Xr hammer 8 ,
11471990c18SSascha Wildner.Xr mount 8
115551c4c36STomohiro Kusumi.Sh HISTORY
116551c4c36STomohiro KusumiThe
117551c4c36STomohiro Kusumi.Nm
118551c4c36STomohiro Kusumicommand appeared in
119551c4c36STomohiro Kusumi.Fx 10.2 .
120551c4c36STomohiro KusumiThe
121551c4c36STomohiro Kusumi.Nm
122551c4c36STomohiro Kusumicommand appeared in
123551c4c36STomohiro Kusumi.Dx 4.5 .
124551c4c36STomohiro Kusumi.Sh AUTHORS
125*cc05af1eSTomohiro Kusumi.An -nosplit
126551c4c36STomohiro KusumiThe
127551c4c36STomohiro Kusumi.Nm
128551c4c36STomohiro Kusumiutility was developed by
129551c4c36STomohiro Kusumi.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
130551c4c36STomohiro Kusumiunder sponsorship from the FreeBSD Foundation.
131551c4c36STomohiro KusumiZFS and GELI support was added by
132*cc05af1eSTomohiro Kusumi.An Allan Jude Aq Mt allanjude@FreeBSD.org .
133551c4c36STomohiro Kusumi.Pp
134551c4c36STomohiro KusumiThe
135551c4c36STomohiro Kusumi.Nm
136551c4c36STomohiro Kusumiutility was ported to
137551c4c36STomohiro Kusumi.Dx
138551c4c36STomohiro Kusumiby
139551c4c36STomohiro Kusumi.An Tomohiro Kusumi Aq Mt kusumi.tomohiro@gmail.com .
140b99c9975STomohiro KusumiDonated to DragonFlyBSD by PeerCorps Trust Fund.
141551c4c36STomohiro Kusumi.Sh BUGS
142551c4c36STomohiro KusumiThe
143551c4c36STomohiro Kusumi.Nm
144551c4c36STomohiro Kusumiutility on
145551c4c36STomohiro Kusumi.Dx
146551c4c36STomohiro Kusumicurrently doesn't support
147551c4c36STomohiro Kusumi.Xr zfs 8
148551c4c36STomohiro Kusumipool and
149551c4c36STomohiro Kusumi.Xr geli 8
150551c4c36STomohiro Kusumiproviders supported on
151551c4c36STomohiro Kusumi.Fx .
152