- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rcp - The parameter list is too long
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 06:05 PM
тАО12-28-2003 06:05 PM
rcp - The parameter list is too long
$rcp -p hostname:/home/a/b/c/* /home/d/e/f
sh: /usr/bin/rcp: The parameter list is too long
There are about 1000 files in directory c, the filename: 1, 2, 3 .... 1000
#getconf ARG_MAX
20478
I would like to know how to determine the maximum length/arguments in single command ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 06:15 PM
тАО12-28-2003 06:15 PM
Re: rcp - The parameter list is too long
A quick work around would be to define a list of files that you need to copy then do them in a loop
for f in `ls -1` /home/a/b/c/*
do
rcp -p $f hostname:/home/d/e/f
done
Or
Install patch, which will fix your problem
http://www5.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHKL_16751&context=hpux:800:10:20
HTH
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 07:03 PM
тАО12-28-2003 07:03 PM
Re: rcp - The parameter list is too long
rcp -pr hostname:/home/a/b/c /home/d/e/f
If you do not want to rcp sub-directories:
cd /home/d/e/f
remsh hostname "cd /home/a/b/c; find . -type f | grep -v '/.*/' | cpio -oca" |
cpio -ic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 07:04 PM
тАО12-28-2003 07:04 PM
Re: rcp - The parameter list is too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 08:23 PM
тАО12-28-2003 08:23 PM
Re: rcp - The parameter list is too long
cd ${source_dir}
tar cf - '*' |
remsh ${target_host} "cd ${target_dir} ; tar xpf -"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 08:34 PM
тАО12-28-2003 08:34 PM
Re: rcp - The parameter list is too long
Any parameter can be set in order to increase the max. value ?
Thanks for kindly help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 08:37 PM
тАО12-28-2003 08:37 PM
Re: rcp - The parameter list is too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 08:50 PM
тАО12-28-2003 08:50 PM
Re: rcp - The parameter list is too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-28-2003 09:03 PM
тАО12-28-2003 09:03 PM
Re: rcp - The parameter list is too long
Check if kernel has the parameter " large_ncargs_enabled = 1 " enabeled, default is 0.
This would raise the ARG_MAX value to 2048000.
Hope this helps,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2003 03:00 AM
тАО12-29-2003 03:00 AM
Re: rcp - The parameter list is too long
Situation #1 (your situation) -- If you are currently logged into your TARGET system and you are copying remotely from the SOURCE system, e.g., rcp -p SOURCE:/home/a/b/c/* TARGET:/home/d/e/f, the SOURCE system wildcard character * will expand the parameter list to:
SOURCE:/home/a/b/c/1
SOURCE:/home/a/b/c/2
...
SOURCE:/home/a/b/c/1000
for each of your thousand files. As the filenames are fully-specified, you are sucking up a whole bunch environmental space just for the filenames.
SITUATION #2 -- You login your SOURCE system and copy locally from SOURCE remotely to the TARGET, e.g., rcp -p * TARGET:/home/d/e/f, assuming you have already cd'd into /home/a/b/c. In this case, the wildcard will expand to simply:
1
2
3
4
...
1000
using up a lot less environmental space.
Personally, I like the "tar-ball pipe" solution the best as described by a previous response. As long as the tar-ball is created on the SOURCE system, then piped to the TARGET system, it will be faster and not be subject to limitations due to the number of files because only 1 big file (the tar-ball) is being transferred across the network instead of 1000 small files. Overhead of opening, copying, closing of each individual file adds some time to the transfer time. You can even throw in a "compress" or "gzip" into the pipe to further reduce the amount of data transferred across the network. Here is complete pipe assuming you're currently logged in on the TARGET system:
remsh SOURCE -n "cd /a/b/c; tar cf - . | gzip -c" | (cd /d/e/f; gunzip -c | tar xvf -)
Happy remote copying!
=:-) Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2003 03:15 AM
тАО12-29-2003 03:15 AM
Re: rcp - The parameter list is too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2003 04:41 AM
тАО12-29-2003 04:41 AM
Re: rcp - The parameter list is too long
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-29-2003 05:49 PM
тАО12-29-2003 05:49 PM