# Copying files from remote system to local via scp or rsync



## Garrek (Jul 28, 2006)

I have been trying, apparently in vain, to copy a folder hierarchy which contains nothing but icons.  Running ls -al on any of the folders shows the icon files having a file size of zero.

To copy the files from the remote system to my local I tried scp:

scp -r -p -C -E 192.168.1.2:/icons /copiedFiles

I get an error of too many open files

I then tried rsync using:

rsync -avz 192.168.1.2:/icons /copiedFiles
which displays:
sent 124296 bytes  received 31045431 bytes  903470.35 bytes/sec
total size is 67260477  speedup is 2.16
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-24/rsync/main.c(1161)

Can anyone PLEASE tell me what I'm doing wrong?


----------



## bluedevils (Jul 28, 2006)

you have actual icons, but ls -al tells you they have a file size of zero?  What mount point is this on?


----------



## Garrek (Jul 28, 2006)

Running DiskUtility on the drive shows me it is a Mac OS X Extended (Journaled) system.  Partition Type is Apple_HFS.

I'm guessing the files are zero, since there really are no contents but the icons are considered metadata and therefore stored elsewhere in the file system.  Does this sound correct?

There are thousands of these icons in the parent or sub-folders.


----------



## spb (Jul 28, 2006)

I know nothing about the /icons directory, but if the problem is that there are too many files, you can always tar them into a single file and then untar it after the transfer.


----------

