I use cygwin find with -ls (find . -ls
) option to have a list of files with full path.
Due to UTF-16 (windows XP in this case) converted to en_UTF-8 under cygwin, special charactere like accent are translate into 2 octal escaped value (ex à
is translate in \303\240
.
If i use the direct ls -lias
command , the string is not translated and can be used with a simple surrounding quote in nay other command (sed, mv, cp, ln, ...).
Question:
Is there a way to directly have the find returning the file name like ls do ?
Actually, I use a sed to translate back using a temporay file and a printf
to have the result of octal translation but it's slow, a bit scary and not bullet proof especially with a following mv and rm based on this string.
I also use a find . -exec ls -lias {} \;
working execpt that the time exploded due to the fork/shell/ls on each file (15 minutes with find -ls, 15 hours with -exec)