0

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)

2
  • 1
    This seems to be an end-user question and so off-topic here. But, try asking on the cygwin list, [email protected]. There's probably someone there who knows the answer. Nov 19, 2014 at 20:54
  • I bit surprise by the Off Topic because it's a pure question of system behaviour specific to a system (cygwin in this case) not reactin as my other AIX, SUN and Linux system. And it is used in batch for monitoring systems, purely professional task. COuld you explain why, i dont see it even after rereading the help center about this point. Thanks Nov 20, 2014 at 6:27

1 Answer 1

2

I don't know if what you want to do is possible with find, but you can speed up your current use of find considerably if you use find | xargs instead of find -exec.

1
  • very good suggestions. Time is very near the simple -print, faster than -ls in my case Nov 19, 2014 at 13:19

Not the answer you're looking for? Browse other questions tagged .