Limit of 21842 files in a directory?

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.

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/ 

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.


Solution 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/