[SOLVED] Trouble with find's ls and non-english filenames
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello!
I have a problem with find utility: when I use the option -ls, files with non-English filenames are displayed incorrectly, for example, the output ls command below (this is correct):
I use the UTF-8 as system codepage, and a locale in system is ru.RU_UTF8. The problem arises because the GNU Find built without support for UTF-8? Thanks for consult.
Thanks, then I have two ways: either use the command shown above you, or to rebuild the find, adding support for UTF-8. Well, try. Wondered why the developers have added support for UTF-8 in the new versions?
find 4.2.2 as shipped w/ Debian does the same thing as you describe. I think
the reason for NOT changing the behaviour is that the developers are concerned
the change might break lots of existing scripts.
Trying to hack utf support into find is certainly an option, but I personally
wouldn't venture down that route. If you dislike the | xargs you could always
use -exec ls -l {} \; or -exec stat "your format string here" {} \; and just
pull out the fields you really want, anyway.
Then I'd better do as you advise, and do not bother with nonsense...
Don't get me wrong, there's nothing wrong with "fixing" find as such; it's just that
you'll have to do it every time your distro updates find-utils, and for me that would
be too much hassle, specially if there's easy work-arounds that don't cause too much
overhead.
Quote:
Originally Posted by yars
Thanks you, and sorry if something is wrong.
No worries, I did understand what you meant, and gathered that you're not
a native English speaker. ;}
Quote:
Originally Posted by yars
Thread can be closed...
We don't close threads here at LQ, we mark them as "solved".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.