On Wed, Apr 13, 2005 at 06:16:59PM +0000, Eric Blake wrote:
> Because of command line length limitations, `find . -print | xargs
> pathchk -c' might not find all case conflicts, so it would be nice
> if pathchk could operate as a filter when no filenames are supplied,
> allowing `find . -print | pathchk -c'. Which also implies that
> `find . -print0 | pathchk -0 -c' should work...
I suppose a reasonable substitute for detecting files with the same
(case-folded) name might be somethign along these lines:-
find "$@" \( -name "* *" -o -name "*
*" \) -printf "[%p] contains a newline or a space and so is not legal in DOS\n"
>&2
find "$@" \! -name "* *" \! -name "*
*" -print | sort -fu | uniq -in | awk '$1 > 1 {printf("%d files have a name
like %s\n", $1, $2);}' >&2
I agree that it would be interesting for pathchk to be able to do this
sort of thing. Perhaps for case-folded filenames, the check would
need to be made once with LC_COLLATE=POSIX and once with the local
collation order (because the files may be named in a non-English
alphabet).
James.
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils