'find -execdir' opens too many file descriptors
Issue
find -execdiropens too many file descriptors- When using the
-execdiroption to find, the program apparently opens a new file descriptor every time it runs the command, and never closes it. - As a result, when traversing a directory tree that contains more than
$(ulimit -n)files (1024 by default), find will fail with the message:
find: Failed to save working directory in order to run a command on `foo': Too many open files
Environment
- Red Hat Enterprise Linux 7
- findutils-4.5.11-5.el7.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
