Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's going to fail if you have a file with a newline in it.

And what are you going to do when you want to find all files modified more then 32 hours ago?

-delete is necessary because otherwise there is a race condition which can allow a regular user to make root delete any file.

See: http://news.ycombinator.com/item?id=2699050

You should not use -exec, you should use -execdir, -exec is not safe.



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

Search: