- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Copy large number of files using cp command
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
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
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
06-28-2000 10:35 PM
06-28-2000 10:35 PM
Copy large number of files using cp command
I want to copy large number of files within one directory to another directory. When I am going to copy I am getting error message saying that list is too large. Is there a limitaion within cp command. How can I get arround from this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2000 10:48 PM
06-28-2000 10:48 PM
Re: Copy large number of files using cp command
the restriction is not the cp command but the shell itself.
Use the cpio instead:
cd
ls | cpio -pmdv
This will copy all files in
If you want to copy a full tree (with subdirs) you can use:
cd
find . -depth | cpio -pmdv
Greetings
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2000 10:51 PM
06-28-2000 10:51 PM
Re: Copy large number of files using cp command
To copy all files and subdirectory to target directory by using cp with -r option.
syntax as follows...
#cp -r /data /data1
(Here all files and subdirectory will be copied in to /data1 directory)
You can Help page for "cp" command use #man cp
by
suren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2000 06:27 AM
06-29-2000 06:27 AM
Re: Copy large number of files using cp command
cd dir
dir=the dir you want to copy all files from
ls > /tmp/somefile
for X in `cat /tmp/somefile`
do
cp $X newdir
echo copying $X
done
newdir being the new directory you want to copy to
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2000 06:35 AM
06-29-2000 06:35 AM
Re: Copy large number of files using cp command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2000 06:35 AM
06-29-2000 06:35 AM
Re: Copy large number of files using cp command
cd to directory
find . -depth | cpio -pmuldv /newpath
This will keep the permissions the same and create the needed subdirectories with the files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2000 04:57 AM
06-30-2000 04:57 AM
Re: Copy large number of files using cp command
cd to the source directory and then:
# tar cf - . | ( cd dest-dir ; tar xf - )
Cheers,
Harm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2000 08:28 AM
06-30-2000 08:28 AM
Re: Copy large number of files using cp command
increased on series 700, HP-UX 10.20. The
default limit was 20478 bytes total for
environment variables and command
arguments. If you apply patch PHKL_16750 and set the tunable kernel parameter
large_ncargs_enabled to 1, then the limit
will increase to 2048000 bytes.
That larger limit is the default for 11.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2000 02:28 AM
07-02-2000 02:28 AM
Re: Copy large number of files using cp command
-------------------------------------------
cd sourcedir
find . -name '*' -exec cp {} /targetdir ;
-------------------------------------------
also good for removing large numbers of files from a directory:
--------------------------------------------
find . -name 'xxx*' -exec rm {} ;
--------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2000 12:36 PM
07-03-2000 12:36 PM
Re: Copy large number of files using cp command
Did you get this working, or is it a ulimit problem?