3

I am trying to move very big file from one host to another host. Also the file names are too large so I have to use xargs. Also all the sub directories need to be copied also

I am using the below command in the source host current directory

find . -name "*" -type f -print0 | xargs -0 scp -r UserName@host:/path/to/destination

but it is throwing below error

scp: /path/to/destination: not a regular file

1 Answers1

3

find . -type f -print0 | xargs -0 -I {} scp {} UserName@host:/path/to/destination

user1700494
  • 2,202