NavigationUser loginSpam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
some cp problemsHello, 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? |
Re: some cp problems
You need to specify some options when mounting the ntfs partition; you can use:
nls=(character set name)
or
utf8 (if NTFS is using the utf-8 convention)
For example:
mount /dev/hda2 -t ntfs /mnt/windos -o nls="iso8351-1"
mount /dev/hda2 -t ntfs /mnt/windos -o utf8
Once you figure out the correct character encoding to use, if you have an fstab entry for that partition then you can just add the option there.
Re: some cp problems
Hmmm,
So i have tried utf8 with no success. However tab completion displays filename correctly:
cp blahblah [TAB] ----> cp blahblahanonASCIIcharacterfollowscorrectly.doc
Despite this, cp is still not able to copy it (again cannot stat: "Invalid or incomplete multibyte sequence" error)
if the utf8 is not a default encoding on XP (but shouldn't that be the case from SP 2?) do you maybe know how to find this out?
(btw: start_unicode doesn't work)
I'll try to google smthg out.
Re: some cp problems
Noooo! You were right!!! it works with utf8, only i can't display the names correctly but cp now works. Thanks!
Re: some cp problems
Actually something strange is going on. While I can copy an individual file via cp blahblah.xyz to path/blahblah.xyz without a problem, if I invoke do cp -R on a directory, I'll get the same error messages : cannot stat: invalid multibyte sequence
oh and I am doing this from a console only system (a rescue disc)
Re: some cp problems
Is the NTFS partition OK or is the drive defective? If you have a faulty drive, you should use something like 'ddrescue' or 'gddrescue' to create an image and then attempt to recover files from the image.
If your disks are all OK, I have no idea why you get that multibyte error.
Re: some cp problems
drives are OK. In contrast to 'cp -R' mc is not complaining about the filenames anymore so I suceeded in what i wanted to do. I just don't understand why would a single cp a/b.doc c/ work while cp -R a c/ does not. This probably means that i need to add a complete international support to the console (in addition to that mount command), but I never bothered too much to figure out how to display my characters, since graphical environments to that without much fuss.