AOA,
I want to copy large amount of files aproximately more than 20,000 files from one dirctory to another, but it gives me error like:
#cd /opt/appserver/images
#cp * /opt/appserver02/public/images
Argument list is too long
Also abobe mention error appear again when i run:
#cd /opt/appserver/images
#chown root.root *
How can i copies & change owner.
cp & chown issue.
Re: cp & chown issue.
Code: Select all
rsync --inplace -PHvza /opt/appserver/images/* /opt/appserver02/public/images/
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Re: cp & chown issue.
AOA,
I dont want to use RSYNC, i need a script or something like commands just using xargs,find
I dont want to use RSYNC, i need a script or something like commands just using xargs,find
Re: cp & chown issue.
Senior recommend rsync command, that he recommend it is fine, Why you don't want to use rsync. Do you want us to write script for you?
Re: cp & chown issue.
AOA,
If possible to write script for me, also combination of xargs (dont rsync) required.
If possible to write script for me, also combination of xargs (dont rsync) required.
Re: cp & chown issue.
how much you will pay for your homework?
Re: cp & chown issue.
Try this:
ls -l /opt/appserver/images | xargs -i cp -rpf /opt/appserver/images/{} /opt/appserver02/public/images/
ls -l /opt/appserver/images | xargs -i cp -rpf /opt/appserver/images/{} /opt/appserver02/public/images/
Re: cp & chown issue.
Again i faced the same problem but now in archiving:
tar -cvf images-13122011.tar /opt/appserver02/public/images
Error is:
Argument list is too long
tar -cvf images-13122011.tar /opt/appserver02/public/images
Error is:
Argument list is too long