- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /usr/bin/cp: the parameter list is too long
Operating System - HP-UX
1820636
Members
1829
Online
109626
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО06-30-2009 01:45 AM
тАО06-30-2009 01:45 AM
/usr/bin/cp: the parameter list is too long
Hi,
here is my machine info
B.11.11 U
i have a problem when copying, moving or listing the directory which contains a lot of files.
search around the forum but no go
#getconf ARG_MAX
2048000
i did try xargs command but still no go.
ls $A | xargs -i -t cp $A/ {} $B/ {}
can somebody help me on this matter. Thanks
here is my machine info
B.11.11 U
i have a problem when copying, moving or listing the directory which contains a lot of files.
search around the forum but no go
#getconf ARG_MAX
2048000
i did try xargs command but still no go.
ls $A | xargs -i -t cp $A/ {} $B/ {}
can somebody help me on this matter. Thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 03:32 AM
тАО06-30-2009 03:32 AM
Re: /usr/bin/cp: the parameter list is too long
Hi:
Given you example where :
# ls $A ...
...you are still telling the shell to glob and, in your case, the argument list generated exceeds the maximum size allowed.
You need to divide-and-conquer. One way would be to handle the contents of multiple sub-directories. You might also leverage 'find' matching its '-name' argument in its selection.
Regards!
...JRF...
Given you example where :
# ls $A ...
...you are still telling the shell to glob and, in your case, the argument list generated exceeds the maximum size allowed.
You need to divide-and-conquer. One way would be to handle the contents of multiple sub-directories. You might also leverage 'find' matching its '-name' argument in its selection.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 04:23 AM
тАО06-30-2009 04:23 AM
Re: /usr/bin/cp: the parameter list is too long
What does $A have? A directory or a pattern?
The former shouldn't have problems.
The former shouldn't have problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 04:32 AM
тАО06-30-2009 04:32 AM
Re: /usr/bin/cp: the parameter list is too long
try to use
find /path -exec cp { } /new/path \;
find /path -exec cp { } /new/path \;
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP