ODFFILESEARCH(1)
π¦ ODFFILESEARCH(1) β like, a whole file-search era π
okay bestie, so this is odffilesearch, straight out of the User Contributed Perl Documentation corner of the universe, and it's genuinely iconic. it's a little Perl cutie that goes through your OpenDocument files and pulls out the ones that match your keywords. let's get into it β¨
πΈ NAME πΈ
odffilesearch β file selection by keywords. that's it, that's the whole gig. you give it words, it gives you files. match made in heaven fr fr π«Ά
π SYNOPSIS π
odffilesearch -R "D:\Documents\*.odt" openoffice desktop XML
so this one produces the list of the ODF Text documents present in the given directory and its subdirectories, and containing the words "openoffice", "desktop" AND "XML". all three, no half-measures, she's picky and we love that for her π
odffilesearch -command "rm -f %f" "*.ods *.odt" lost dismiss cancel
and this one executes the "rm -f filename" (i.e. deletes the file in a Unix system) for each ODT or ODS file present in the current directory and containing the words "lost", "dismiss" AND "cancel".
β οΈ okay so real talk, that second example literally deletes files. it's the manpage's own example, not a drill, so please look at your filter twice before you hit enter bestie π
π USAGE π
odffilesearch [-options] <file filter> <keyword list>
β¨ DESCRIPTION β¨
this utility allows the user to retrieve a list of files matching a given set of keywords or regular expressions. a file gets selected when it contains, in its text and/or in its metadata (title, subject, keywords or description), all the given search strings. all of them. every single one. she does not do partial credit π
the selected files are echoed to the standard output (one file per line), so this utility can be used as a filter piping its results to another program. alternatively, a given shell command can be launched by the script each time a file matches, allowing on-the-fly processing of the selected documents. very main character energy, honestly π₯
the files filter may content one or more space-separated paths. each path may content jokers. so it's possible to explore several directories and/or several filename patterns β like, go off, explore the whole filesystem, we support you π§
and heads up: all the arguments after the file filter are processed as search criteria. so once the filter is done, everything else is a keyword. no cap.
π OPTIONS π
-R,-recursiveβ include the subdirectories of each given search directory. she goes deep π³οΈ-verbose,-trace,-debugβ echo some processing comments, so you can watch her work and feel involved π-warningsβ activate the warning messages of theOpenOffice::OODocAPI. let her vent, she's earned it-log <file>β like-verbose, but then messages are sent to the given file and don't pollute the standard output. tidy queen behavior β¨-result <file>,-output <file>β send the list of matching files to the given file and not to the standard output-criteria <file>β get search criteria from a file (one per line); the loaded search keywords may be combined with additional criteria passed with the command line, if any. stack 'em, mix 'em, the more the merrier π-command <command>,-exec <command>β execute a shell command for each matching file; if the command string contains"%f", this substring is replaced with the name of the selected file; if this option is provided, the selection list is not echoed to the standard output; if-verboseis on, the value returned by the command is echoed π«Ά-encoding <encoding>β selects the user's character set; this option is mandatory if one or more search criteria contain characters not belonging to the default character set. not optional, not a suggestion, mandatory mandatory π¨
that's the whole page bestie, no notes, she ate and left zero crumbs ππ
sign-off time: this page lives under User Contributed Perl Documentation, it's from perl v5.42.3, and it's dated 2010-07-12 β a true vintage icon, still slaying in the group chat βπ
π¦ where this page comes from
- nixos 26.05: perl5.42.3-OpenOffice-OODoc 2.125
- nixpkgs unstable: perl5.42.3-OpenOffice-OODoc 2.125
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms