fnmatch.h(7POSIX)
π¦ fnmatch.h(7POSIX) β bestie edition π¦
okay so you just opened the manual page for fnmatch.h, which lives in the POSIX Programmer's Manual. Pull up a chair, grab a strawberry π, we're doing this.
π« PROLOG π«
Real talk first: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so like, go consult the corresponding Linux manual page for the deets on Linux behavior, iykyk), or β and this is the part nobody likes β the interface may not be implemented on Linux at all. π
β¨ NAME β¨
fnmatch.h β the header that gives you filename-matching types. That's the whole vibe. π
π SYNOPSIS π
#include <fnmatch.h>
That's it. That's the entrance. π«Ά
π DESCRIPTION π
So the <fnmatch.h> header shall define the following symbolic constants. Not "might", not "could" β shall. Periodt.
FNM_NOMATCHβ the string does not match the specified pattern. The classic "it's giving no". πFNM_PATHNAMEβ a<slash>in the string only matches a<slash>in the pattern. Slash matches slash, no crossover episodes. π₯FNM_PERIODβ a leading<period>in the string must be exactly matched by a<period>in the pattern. No sneaky wildcards sneaking past that dot. πFNM_NOESCAPEβ disables backslash escaping. Backslashes lose their powers, sorry bestie. β¨
And then, the following shall be declared as a function and may also be defined as a macro. Either way, a function prototype shall be provided:
int fnmatch(const char *, const char *, int);
Look at that signature. Iconic. π
The following sections are informative, meaning they're the ~bonus content~. π
πΈ APPLICATION USAGE πΈ
None.
(Yes really. Nothing. We love a low-effort queen.) π
π§ RATIONALE π§
None.
(Also nothing. The rationale said "no thoughts, head empty". π)
β FUTURE DIRECTIONS β
None.
(Third one. The trilogy of nothing. Slay.) π
π SEE ALSO π
The System Interfaces volume of POSIX.1β2017, fnmatch(). Go read that one next, bestie, that's where the actual matching happens. π¦
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
So basically: in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document β it's the main character, this page is just the understudy. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Also, any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. Not the standard's fault, not mine, it's the conversion pipeline's. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html . π«Ά
okay bye bestie, go match some filenames πβ¨ β this page came to you courtesy of IEEE/The Open Group, 2017, and it's the fnmatch.h(7POSIX) page, no cap. ππ¦
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms