xref: /openbsd/sbin/ncheck_ffs/ncheck_ffs.8 (revision 73471bf0)
1.\"	$OpenBSD: ncheck_ffs.8,v 1.27 2020/02/08 17:25:25 schwarze Exp $
2.\"
3.\" Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd $Mdocdate: February 8 2020 $
27.Dt NCHECK_FFS 8
28.Os
29.Sh NAME
30.Nm ncheck_ffs ,
31.Nm ncheck
32.Nd generate names from inode-numbers
33.Sh SYNOPSIS
34.Nm ncheck_ffs
35.Op Fl ams
36.Op Fl f Ar format
37.Op Fl i Ar number ...
38.Ar filesystem
39.Sh DESCRIPTION
40.Nm
41generates a list of filenames and inode numbers for the given
42file system.
43Names of directories are followed by a
44.Sq \&. .
45.Nm
46may be invoked more simply as
47.Nm ncheck ,
48with no change in behaviour.
49.Pp
50The options are as follows:
51.Bl -tag -width Ds
52.It Fl a
53Print the file names
54.Sq \&.
55and
56.Sq .. ,
57which are ordinarily skipped.
58.It Fl f Ar format
59Use a custom output format when printing inode information.
60Characters from
61.Ar format
62are printed for each inode with the following escape sequences:
63.Pp
64.Bl -tag -width Ds -offset indent -compact
65.It Cm \ea
66Print a
67.Aq bell
68character.
69.It Cm \eb
70Print a
71.Aq backspace
72character.
73.It Cm \ee
74Print an
75.Aq escape
76character.
77.It Cm \ef
78Print a
79.Aq form-feed
80character.
81.It Cm \eI
82Print the inode number.
83.It Cm \en
84Print a
85.Aq new-line
86character.
87.It Cm \eP
88Print the pathname to the file using the current inode number.
89.It Cm \er
90Print a
91.Aq carriage return
92character.
93.It Cm \et
94Print a
95.Aq tab
96character.
97.It Cm \ev
98Print a
99.Aq vertical tab
100character.
101.It Cm \e\(aq
102Print a
103.Aq single quote
104character.
105.It Cm \e\e
106Print a backslash character.
107.It Cm \e0
108Print a NUL character.
109.El
110.Pp
111All other characters, when prefixed by a backslash, simply print
112the character following the backslash.
113The device name is not printed on the first line of output when the
114.Fl f
115option is specified.
116.It Fl i Ar number ...
117Report only those files whose inode numbers are as listed.
118.It Fl m
119Give more verbose information on inodes.
120.It Fl s
121Report only special files and files with set-user-ID or set-group-ID
122set.
123This is meant to find hidden violations of security policies.
124.El
125.Pp
126The report is not sorted.
127.Sh SEE ALSO
128.Xr sort 1 ,
129.Xr fsck 8 ,
130.Xr fsdb 8
131.Sh HISTORY
132An
133.Nm ncheck
134command appeared in
135.At v6 .
136The
137.Nm
138command was designed to be similar in functionality to the corresponding
139command in SunOS 4.1.3.
140.Sh AUTHORS
141.An Thorsten Lockert Aq Mt tholo@sigmasoft.com
142