Closed donmontalvo closed 2 years ago
I'd like to support this truly great idea, as I also run in the problem that I would like to scan everything except one path (here: /mnt - leads to out of memory, and increasing the heap size does not help ATM).
I'd like to support this truly great idea, as I also run in the problem that I would like to scan everything except one path (here: /mnt - leads to out of memory, and increasing the heap size does not help ATM).
while there were options for launching via thefind
find / -regextype posix-egrep -regex ".*\.(jar|war)$" ! -path "/data/*" ! -path "/mnt/*" -print -exec java -jar /usr/local/bin/log4j-detector-2021.12.14.jar {} \;
I myself would like to see this as an option.
Using find ... -exec java ...
means that a new java process must be started for each file. This is very inefficient.
A better solution can be found here #43 and here #42.
New "--exclude=X" flag added in v2021.12.20.
(Note: X must be a valid JSON list. I know JSON can be a bit awkward to type on the terminal with all the backslashing, but I needed to be sure the supplied exclude paths could be extracted precisely, commas and spaces and all).
Seems like
/System/Volumes/Data
is not needed?Apologies for the blob, might bring it in to a text editor to see what I mean.