Hello there,
I am trying to backup some data to a freshly bought 1 TB USB Drive in Linux Mint. However, when I copy+paste it starts transferring data really quick at first, then slows down and ends with an error concerning directories that have dots in their names („Invalid filename“ or „Invalid argument“ when using cp in the command line). The strange thing is that this shouldn't be a problem, as the data already rests on an internal hard drive, which is also ntfs-formatted.
The only threads concerning this problem are about 10 years old and all consider just renaming the directories using some command line tools. That's fine for me if nothing else works, but I think I might be missing something here. Can anyone help? I am happy to provide any information necessary.
Thanks a lot.
Internal harddrive is a Seagate Barracuda ST1000DM010-2EP102
External harddrive is a Seagate Expansion Portable 1 TB
System is Linux Mint 20.1
Invalid filename error when copying from one ntfs to another
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Invalid filename error when copying from one ntfs to another
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Invalid filename error when copying from one ntfs to another
Hello, n0madsoul.
Please share the complete unmodified commandline, which you execute, and the complete unshortened screen output, which the command displays, with us.
We need both in order to have an idea what the issue may be.
Best regards,
Karl
Please share the complete unmodified commandline, which you execute, and the complete unshortened screen output, which the command displays, with us.
We need both in order to have an idea what the issue may be.
Best regards,
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Re: Invalid filename error when copying from one ntfs to another
Hello there and thanks for the quick reply. I can reproduce the error with this
Outpout reads as follows
In English it would be this I guess
Code: Select all
cp -R /mnt/580D692D5C65BD65/Dokumente/Bewerbungen/Zertifikate\,\ Zeugnisse\ etc./ /media/user/Seagate\ Backup/Dokumente
Code: Select all
cp: das Verzeichnis '/media/user/Seagate Backup/Dokumente/Zertifikate, Zeugnisse etc.' kann nicht angelegt werden: Das Argument ist ungültig
Code: Select all
cp: cannot create regular file 'xx': Invalid argument
Re: Invalid filename error when copying from one ntfs to another
Yuo have a period at the end of the name (n0madsoul wrote: ⤴Wed May 12, 2021 8:33 am Hello there and thanks for the quick reply. I can reproduce the error with this
Outpout reads as followsCode: Select all
cp -R /mnt/580D692D5C65BD65/Dokumente/Bewerbungen/Zertifikate\,\ Zeugnisse\ etc./ /media/user/Seagate\ Backup/Dokumente
In English it would be this I guessCode: Select all
cp: das Verzeichnis '/media/user/Seagate Backup/Dokumente/Zertifikate, Zeugnisse etc.' kann nicht angelegt werden: Das Argument ist ungültig
Code: Select all
cp: cannot create regular file 'xx': Invalid argument
Zertifikate, Zeugnisse etc.
) :Edit: from here: https://kb.acronis.com/content/39790In addition to these characters, the following conventions are also illegal:
Placing a space at the end of the name
Placing a period at the end of the name
The
windows_names
restriction is part of the partition mount parameters in linux, so the name could be OK on one partition but not another, depending how they're mounted.Edit: with
windows_names
set:
Code: Select all
/mnt/BU_NTFS/DATA # ls > a
/mnt/BU_NTFS/DATA # ls > a.a
/mnt/BU_NTFS/DATA # ls > a.
zsh: invalid argument: a.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Invalid filename error when copying from one ntfs to another
Thanks for the info.
and now ?
Such an operating system is not usable.
Will the problem be solved in the foreseeable future ?
I am a layman. Is it not possible to use the tool
from OpenSuse Leap 15.3 ?
Greetings
freddyy
and now ?
Such an operating system is not usable.
Will the problem be solved in the foreseeable future ?
I am a layman. Is it not possible to use the tool
from OpenSuse Leap 15.3 ?
Greetings
freddyy
Re: Invalid filename error when copying from one ntfs to another
You have a folder that has a period on the end of it. Maybe more than one. We are thinking you should remove that period. Is that possible / practical / acceptable to you?
If you open a terminal in the root of the NTFS drive and type
find * -type d -iname '*.'
That might list all the directories with a period at the end of them.
Can you rename them?
If you don't know how to open a terminal in the root of the NTFS drive, open a terminal and type this:
Then report the results here.
If you open a terminal in the root of the NTFS drive and type
find * -type d -iname '*.'
That might list all the directories with a period at the end of them.
Can you rename them?
Maybe. Do you know what the tool is called? Perhaps we can find another tool that does the same thing.Is it not possible to use the tool from OpenSuse Leap 15.3?
If you don't know how to open a terminal in the root of the NTFS drive, open a terminal and type this:
Code: Select all
df -Th
Re: Invalid filename error when copying from one ntfs to another
Hello, freddyy.
Mac OS permits having filenames and foldernames having a dot as the last character.
Windows does not permit so by default. Reason: The last dot in a filename is always considered the separator between filename and filename extension. No extension, no dot.
As you are copying from one NTFS filesystem to another NTFS filesystem, NTFS filesystem naming conventions apply. NTFS is a Windows filesystem type.
Linux Mint merely sticks to the NTFS filesystem rules in this case.
So which operating system is unusable? - I guess you will have to accept that different operating systems have got slightly different rules. And you will have to accept these rules.
Regards.
Karl
Which operating system do you consider unusable? Linux Mint? Or Windows? Or MacOS?
Mac OS permits having filenames and foldernames having a dot as the last character.
Windows does not permit so by default. Reason: The last dot in a filename is always considered the separator between filename and filename extension. No extension, no dot.
As you are copying from one NTFS filesystem to another NTFS filesystem, NTFS filesystem naming conventions apply. NTFS is a Windows filesystem type.
Linux Mint merely sticks to the NTFS filesystem rules in this case.
So which operating system is unusable? - I guess you will have to accept that different operating systems have got slightly different rules. And you will have to accept these rules.
Regards.
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline