Hacker News new | past | comments | ask | show | jobs | submit login

> What makes find so powerful is that you can execute commands involving the found files using the option -exec.

Or -print0 and pipe to xargs -0




GNU find on rhel9 has explicit warnings about the -exec option:

"There are unavoidable security problems surrounding use of the -exec action; you should use the -execdir option instead."

"If you are using find in an environment where security is important (for example if you are using it to search directories that are writable by other users), you should read the `Security Considerations' chapter of the findutils documentation, which is called Finding Files and comes with findutils. That document also includes a lot more detail and discussion than this manual page, so you may find it a more useful source of information."




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: