2 ms·
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? -d
by ars 15y ago
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 http://news.ycombinator.com/item?id=2699050
You should not use -exec, you should use -execdir, -exec is not safe.