cp

cp: cannot create regular file 'foo': Invalid argument (with CJK script / encoding)

Problem

After mounting a usb storage medium, I try to copy a file to it, but I get the following error:

$ cp 黃.txt /media/usb/
cp: cannot create regular file '/media/usb/黃.txt': Invalid argument

The problem occurs only with files which include Chinese (CJK) encoded characters.
The following works without problem:
$ cp test.txt /media/usb/

Solution

Check the options the usb medium has been mounted:

$ grep /media/usb/ /proc/mounts

Syndicate content