cp -r skips files

  • Jason Anderson
    Jason Anderson

    Hi.  Sometimes when I use cp -r to copy some directories, not all the files are copied.  It's repeatable, but doesn't happen with xcopy.

    mkdir \bi\copytemp
    cd \bi\project\part\workspace
    cp -r * \bi\copytemp

    I'm using cp 3.16 in cmd.exe on Windows XP Pro SP2.

    The above commands don't copy the folder \bi\project\part\workspace\m\source\m\server\packages\MPT\i\application, but everything else is copied.  All the files I'm copying have the same permissions and attributes (not system or hidden or readonly or archive).  If I change the "part" folder name, the problem doesn't happen.  If I change the name back to "part", it happens again.  The destination directory doesn't affect it.  This works fine: 'cp -r m \bi\copytemp'.

    Does anyone know a reason why this is happening?  How can I troubleshoot further to determine the cause?