Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
I needed to copy some files from an winxp ntfs partition to some other place using linux. The problem was that midnight commander i was using to copy the files had a problem with filnames from the ntfs partition which are containing non-ASCII characters (the error was: "...invalid multibyte character..." or similar. I think that on one previous occasion i had the same problem with 'cp' command as well.). Is there some workaround to copy those files?
From command line when there are odd (non-printing) characters in a filename I've sometimes been able to overcome it by using meta-characters.
Say there were a file that "ls *" displayed as "thisfile" but wouldn't show up when I typed "ls thisfile" I'd know there was a character I couldn't see. So I would try to find a pattern that would match ONLY "thisfile" such as "ls "thisf*" or "ls *hisf*". Once I was sure the ls command had listed only the file I was interested in I would use the same pattern in the copy
So "cp *hisf* newfile" to copy to a new name in same directory or "cp *hisf* newdir" to copy with the same name to a new directory.
Sometimes even that fails due to the special character(s) so putting "./" in front of the pattern helps. "cp ./*hisfile* newfile".
To make my question a bit more precise, the NTFS partition in question is yet another WinXP volume which needs to be reformatted and reinstalled due to accumulated malfunction over time to the point of complete disfunction. But the problem is that it has various important *.doc files in various directories which I need to copy somewhere else befor i destroy the system. These documents have sometimes filenames which include Serbian characters (Latin, not Cyrillic) that "cp" has problem with (cannot stat: blah blah invalid or incomplete multibyte character).
Another problem is that am using console-only rescue Linux distribution(PLD linux) to do the copying. This means I can't just run some UTF friendly Gnome/KDE app for the job. Also, even if i could execute the recommended "cp strangecharacterfollows*.doc aconsoletorelablename.doc" command, this is unfeasible because I have numerous different docs all over the directory tree (or yes, maybe I could do it, but doing this manually for each file seems a bit frightening. I would rather like a cp -R Documents\ and\ Settings solution).
Looking at the enviroment variables in PLD linux, I see that supported locales have some of the UTF-8 ones. I thought this should be enough for the console commands to recognise UTF-8 characters, but it seems it is not.
Any furhter advice??? (Instead of downloading a live distribution containing KDE or Gnome. Bandwidth problems there.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.