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 (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