Copying bulk files from one server to another
HI ALl,
I need to copy a large number of files , it comes to 1 lakh from one server to another. When i tried various commands using scp , ftp etc It is saying "Arg list too long" So Kindly help me in which way can we copy all the files. The Two servers are under Linux. Rgds Jack |
That error happens because your argument list exceeds the limit set by the system. xargs is your friend here. cat filelist |xargs scp ......
|
The "Argument list too long" error, which occurs anytime a user feeds too many arguments to a single command, since all regular system commands are subject to the some limitation.
There are several solutions: Example: Here we are trying to move large number of files. 1.Manually spilt the command line arguments,but you have many arguments so this method wont support 2.Using find command Quote:
The main drawback to this method is the length of time required to complete the process. 3.Create a function Quote:
4.Recompile the Linux kernel involves manually increasing the number of pages that are allocated within the kernel for command-line arguments. If you look at the /usr/include/linux/binfmts.h file, you will find the following near the top: Quote:
|
Hi all
Thanks for your reply for every body It was resolved by using xargs |
Mark the thread SOLVED via the thread tools.
|
All times are GMT -5. The time now is 10:36 PM. |