FINDRULE(1p)
π FINDRULE π
okay bestie, so this is findrule β it lives in the User Contributed Perl Documentation section, it's manual page FINDRULE(1p), and it is literally a command line wrapper for File::Find::Rule. yes. that's the whole vibe. let's get into it π¦
β¨ NAME β¨
findrule β command line wrapper to File::Find::Rule
π USAGE π
findrule [path...] [expression]
that's it. that's the shape of it. paths, then an expression, and she goes π«Ά
πΈ DESCRIPTION πΈ
findrule mostly borrows the interface from GNU find(1) so you can get a command-line interface onto the whole File::Find::Rule hierarchy of modules. it's giving "find but make it perl" and honestly? obsessed. π
so the syntax for expressions is: the rule name, preceded by a dash, followed by an optional argument. and here's the cute part β if that argument is an opening parenthesis, it gets taken as a list of arguments, terminated by a closing parenthesis. that's how you sneak multiple things in there without it being a whole thing. β¨
some examples, because i know you're a visual learner:
find -file -name ( foo bar )
that's files named foo or bar, below the current directory. easy. ate. π
find -file -name foo -bar
that's files named foo, that have pubs (for this is what our ficticious bar clause specifies), below the current directory. yes, ficticious. i don't make the rules, i just relay them. π
find -file -name ( -bar )
that's files named -bar, below the current directory. and listen, this is the important bit: in this case, if we'd have omitted the parenthesis, it would have parsed as a call to name with no arguments, followed by a call to -bar. so like. the parens are not decorative. they are load-bearing. iykyk π
π Supported switches
i'm very slack. please consult the File::Find::Rule manpage for now, and prepend - to the commands that you want. that's the whole instruction. she's honest about her flaws and i respect it π
π Extra bonus switches
findrule automatically loads all of your installed File::Find::Rule::* extension modules, so check the documentation to see what those would be. surprise features, no cap. πβ¨
π§ AUTHOR π§
Richard Clamp <richardc@unixbeard.net> from a suggestion by Tatsuhiko Miyagawa
(so like. one legend, and one legend who suggested it. iconic collaboration energy fr fr π)
β COPYRIGHT β
Copyright (C) 2002 Richard Clamp. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
legal bit, don't skip it bestie β same terms as Perl itself, that's the deal π€
π₯ SEE ALSO π₯
File::Find::Rule
and that's the whole page!! go forth and find things, you absolute main character ππ
this gem of a manual page came to you courtesy of perl v5.40.1, dated 2025-12-18, and honestly? she's still slaying β¨ππ¦
π¦ where this page comes from
- ubuntu resolute: libfile-find-rule-perl 0.35-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libfile-find-rule-perl 0.35-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms