News for hackers. Stuff that matters.
Re:1% of CMS-Powered Sites Expose Their Database Passwords (... by emillon on Monday February 04, 2013 @09:32AM (#5164210)
Technically, your solution does not work with files whose name contain a space or newline. A working solution is either to do '-print0' in find and '-0' in xargs, or to just use '-delete' instead of the -exec. It is also possible to use '+' instead of ';' with '-exec' to say "fork as few times as possible", ie pack the largest list of arguments to rm you can. But '-delete', when supported, won't even fork/exec.
Re:1% of CMS-Powered Sites Expose Their Database Passwords (... by mauvehaus on Monday February 04, 2013 @09:39AM (#5164248)
Are these GNU find extensions? I spend a lot of time on solaris, and I don't remember seeing a delete option. Thanks for the tips though!
Re:1% of CMS-Powered Sites Expose Their Database Passwords (... by emillon on Monday February 04, 2013 @02:49PM (#5166602)
You're right, -delete is not standard, but I think that + and -print0 are.