xref: /dragonfly/usr.sbin/fstyp/fstyp.8 (revision 6025be58)
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.\"
31*6025be58STomohiro Kusumi.Dd August 28, 2021
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.
47*6025be58STomohiro KusumiIt can recognize BeFS (BeOS), ISO-9660, exFAT, Ext2, FAT, NTFS, UFS, HAMMER, and HAMMER2 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
60*6025be58STomohiro Kusumibefs
61*6025be58STomohiro Kusumi.It
62551c4c36STomohiro Kusumicd9660
63551c4c36STomohiro Kusumi.It
6427ded0eaSTomohiro Kusumiexfat
6527ded0eaSTomohiro Kusumi.It
66551c4c36STomohiro Kusumiext2fs
67551c4c36STomohiro Kusumi.It
68551c4c36STomohiro Kusumimsdosfs
69551c4c36STomohiro Kusumi.It
70551c4c36STomohiro Kusumintfs
71551c4c36STomohiro Kusumi.It
72551c4c36STomohiro Kusumiufs
73551c4c36STomohiro Kusumi.It
74551c4c36STomohiro Kusumihammer
75030fdd8aSTomohiro Kusumi.It
76030fdd8aSTomohiro Kusumihammer2
77551c4c36STomohiro Kusumi.El
78551c4c36STomohiro Kusumi.Pp
79551c4c36STomohiro KusumiNote that HAMMER filesystem consists of more than one volumes requires a path in blkdevs format.
80551c4c36STomohiro KusumiSee
81551c4c36STomohiro Kusumi.Xr hammer 8
82551c4c36STomohiro Kusumifor blkdevs format.
83551c4c36STomohiro Kusumi.Nm
84551c4c36STomohiro Kusumidoesn't recognize partially specified block devices as HAMMER filesystem volumes unless
85551c4c36STomohiro Kusumi.Fl u
86551c4c36STomohiro Kusumiflag is specified.
87551c4c36STomohiro Kusumi.Pp
88551c4c36STomohiro KusumiBecause
89551c4c36STomohiro Kusumi.Nm
90551c4c36STomohiro Kusumiis built specifically to detect filesystem types, it differs from
91551c4c36STomohiro Kusumi.Xr file 1
92551c4c36STomohiro Kusumiin several ways.
93551c4c36STomohiro KusumiThe output is machine-parsable, filesystem labels are supported,
94551c4c36STomohiro Kusumiand does not try to recognize any file format other than filesystems.
95551c4c36STomohiro Kusumi.Pp
96551c4c36STomohiro KusumiThese options are available:
97551c4c36STomohiro Kusumi.Bl -tag -width ".Fl l"
98551c4c36STomohiro Kusumi.It Fl l
99551c4c36STomohiro KusumiIn addition to filesystem type, print filesystem label if available.
100551c4c36STomohiro Kusumi.It Fl s
101551c4c36STomohiro KusumiIgnore file type.
102551c4c36STomohiro KusumiBy default,
103551c4c36STomohiro Kusumi.Nm
104551c4c36STomohiro Kusumionly works on regular files and disk-like device nodes.
105551c4c36STomohiro KusumiTrying to read other file types might have unexpected consequences or hang
106551c4c36STomohiro Kusumiindefinitely.
107551c4c36STomohiro Kusumi.It Fl u
108551c4c36STomohiro KusumiInclude filesystems and devices that cannot be mounted directly by
109551c4c36STomohiro Kusumi.Xr mount 8 .
110551c4c36STomohiro Kusumi.El
111551c4c36STomohiro Kusumi.Sh EXIT STATUS
112551c4c36STomohiro KusumiThe
113551c4c36STomohiro Kusumi.Nm
114551c4c36STomohiro Kusumiutility exits 0 on success, and >0 if an error occurs or the filesystem
115551c4c36STomohiro Kusumitype is not recognized.
116551c4c36STomohiro Kusumi.Sh SEE ALSO
117551c4c36STomohiro Kusumi.Xr file 1 ,
118551c4c36STomohiro Kusumi.Xr autofs 5 ,
11971990c18SSascha Wildner.Xr hammer 8 ,
120030fdd8aSTomohiro Kusumi.Xr hammer2 8 ,
12171990c18SSascha Wildner.Xr mount 8
122551c4c36STomohiro Kusumi.Sh HISTORY
123551c4c36STomohiro KusumiThe
124551c4c36STomohiro Kusumi.Nm
125551c4c36STomohiro Kusumicommand appeared in
126551c4c36STomohiro Kusumi.Fx 10.2 .
127551c4c36STomohiro KusumiThe
128551c4c36STomohiro Kusumi.Nm
129551c4c36STomohiro Kusumicommand appeared in
130551c4c36STomohiro Kusumi.Dx 4.5 .
131551c4c36STomohiro Kusumi.Sh AUTHORS
132cc05af1eSTomohiro Kusumi.An -nosplit
133551c4c36STomohiro KusumiThe
134551c4c36STomohiro Kusumi.Nm
135551c4c36STomohiro Kusumiutility was developed by
136551c4c36STomohiro Kusumi.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
137551c4c36STomohiro Kusumiunder sponsorship from the FreeBSD Foundation.
138551c4c36STomohiro KusumiZFS and GELI support was added by
139cc05af1eSTomohiro Kusumi.An Allan Jude Aq Mt allanjude@FreeBSD.org .
140551c4c36STomohiro Kusumi.Pp
141551c4c36STomohiro KusumiThe
142551c4c36STomohiro Kusumi.Nm
143551c4c36STomohiro Kusumiutility was ported to
144551c4c36STomohiro Kusumi.Dx
145551c4c36STomohiro Kusumiby
14649837aefSTomohiro Kusumi.An Tomohiro Kusumi Aq Mt tkusumi@netbsd.org .
147b99c9975STomohiro KusumiDonated to DragonFlyBSD by PeerCorps Trust Fund.
148551c4c36STomohiro Kusumi.Sh BUGS
149551c4c36STomohiro KusumiThe
150551c4c36STomohiro Kusumi.Nm
151551c4c36STomohiro Kusumiutility on
152551c4c36STomohiro Kusumi.Dx
153551c4c36STomohiro Kusumicurrently doesn't support
154551c4c36STomohiro Kusumi.Xr zfs 8
155551c4c36STomohiro Kusumipool and
156551c4c36STomohiro Kusumi.Xr geli 8
157551c4c36STomohiro Kusumiproviders supported on
158551c4c36STomohiro Kusumi.Fx .
159