.\" and copyright (c) 2006 Justin Pryzby <justinpryzby@users.sf.net>
.\" and copyright (c) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
-.\" This is free documentation; you can redistribute it and/or
-.\" modify it under the terms of the GNU General Public License as
-.\" published by the Free Software Foundation; either version 2 of
-.\" the License, or (at your option) any later version.
-.\"
-.\" The GNU General Public License's references to "object code"
-.\" and "executables" are to be interpreted as the output of any
-.\" document formatting or typesetting system, including
-.\" intermediate and printed output.
-.\"
-.\" This manual is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, see
-.\" <http://www.gnu.org/licenses/>.
-.\" %%%LICENSE_END
+.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sun Jul 25 11:02:22 1993 by Rik Faith (faith@cs.unc.edu)
.\" 2006-05-24, Justin Pryzby <justinpryzby@users.sf.net>
.\" 2006-05-24, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added an example program.
.\"
-.TH FTW 3 2020-06-09 "Linux" "Linux Programmer's Manual"
+.TH FTW 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
.SH NAME
ftw, nftw \- file tree walk
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
.SH SYNOPSIS
.nf
.B #include <ftw.h>
.BI " int " typeflag ", struct FTW *" ftwbuf ),
.BI " int " nopenfd ", int " flags );
.PP
-.B #include <ftw.h>
-.PP
.BI "int ftw(const char *" dirpath ,
.BI " int (*" fn ")(const char *" fpath ", const struct stat *" sb ,
.BI " int " typeflag ),
current working directory at the time of the call to
.BR nftw (),
if
-.IR dirpath
+.I dirpath
was expressed as a relative pathname,
or as an absolute pathname, if
.I dirpath
.IP * 3
.BR ftw ()
has no
-.IR flags
+.I flags
argument.
It behaves the same as when
.BR nftw ()
.hy
.ad
.sp 1
-.SH CONFORMING TO
+.SH STANDARDS
POSIX.1-2001, POSIX.1-2008, SVr4, SUSv1.
POSIX.1-2008 marks
.BR ftw ()
.BR nftw ().
.SH BUGS
According to POSIX.1-2008, when the
-.IR typeflag
+.I typeflag
argument passed to
.IR fn ()
contains