Wed 23 Nov 2005 06:23:24 AM UTC, comment #1:
I have now documented %M. The documentation change will be incorporated in the next releases of findutils-4.2.x and findutils-4.3.x.
Please do submit the enhancement request as a separate item, because I'd like to close this report in order to indicate that the "%M format arg is undocumented" problem itself has been fixed.
Off the top of my head, the other thing that makes it difficult to emulate -ls with -printf is the fact that there is no way to make it indicate the target of a symbolic link:
~$ rm -f foo bar; ln -s foo bar; find bar -ls
165262 0 lrwxrwxrwx 1 jay jay 3 Nov 22 22:17 bar -> foo
So we'd need something that expands to " -> foo" if a file is a symbolic link, and to nothing otherwise.
We're running out of letters for format directives. I'm toying with the idea of supporting %{word} format directives, but the idea is vague as yet. Please phrase your new support request in terms of what you'd like the new directives to expand to, don't worry for the moment about what we'll call them.
The attraction of %{foo} is that maybe we could also consider %{foo%%.jpg} and %{bar:-baz}, not to mention '-exec% foo %{ugh} ;'. Of course, the countervailing argument is that this would be a 10% increase in the size of the code (to pluck a number from thin air) for the convenience of 1% of the users.
Thanks,
James.
|