Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Copying files using Fedora 16 from EXT2 to a NTFS 2TB drive. Discovered that when recursively copying directories of many files, copying stops at file 21842 in each directory... then cp -r moves on to the next directory. No error is given.

Searching the web, found someone else reporting this problem about FAT32 to no avail.

What's going on here? How do I get my files over onto the NTFS drive?


I am not hitting the upper file limit on number of files in an NTFS directory (unlimited). Nor am I am hitting the max number of files for the drive.. (~4billion). I also have lots of free blocks left on the drive.


update: I can create well over 21842 files on the drive on the same system... just can't seem to copy over that number.

This is the command being used:

cp -r /media/BAKKER_UPPER/many_files_here/* /media/NEW_NTFS_HOME/ 
share|improve this question
2  
What's the exact command you're using? –  ott-- Jul 15 '12 at 16:57
2  
I have a hunch that you are running into the classic "argument list too long" issue. Are you trying to copy files based on a filename pattern? Or are you copying all files in the directory tree? –  iglvzx Jul 15 '12 at 16:59
5  
Do it without the wildcard (it's not needed anyways). Shell expansion is going to turn that wildcard into a giant string of source files that will be limited to the number of bytes the shell can accept as an argument, and thus the number of files you can copy. –  Garrett Jul 16 '12 at 5:42
2  
@Garrett Why don't you post that as an answer as it is quite likely to be the right answer. –  Mokubai Jul 25 '12 at 7:41
1  
Done :) (upvotes appreciated!) –  Garrett Jul 26 '12 at 1:29

1 Answer 1

Do it without the wildcard (it's not needed anyways). Shell expansion is going to turn that wildcard into a giant string of source files that will be limited to the number of bytes the shell can accept as an argument, and thus the number of files you can copy.

So your new command would be:

cp -r /media/BAKKER_UPPER/many_files_here/ /media/NEW_NTFS_HOME/ 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.