develooper Front page | perl.beginners | Postings from September 2009

how to do a `cp` on millions of files

Thread Next
September 28, 2009 19:31
how to do a `cp` on millions of files
Message ID:
Hi all,
I have a storage server that holds one million of images with well structured directory structure such as


I want to copy them to the /data2 directory in the same server on another disk partion.
I want to keep the directory structure and `chown` && `chmod` the directories and files,much like doing a `cp -rf /data /data2 && chown -R sysuser:sysuser /data2 && chmod -R 755 /data2`.

File::Find maybe an option.
Is there somebody who have some suggestions?

If I do a `cp -rf /data /data2 && chown -R sysuser:sysuser /data2 && chmod -R 755 /data2`,how much time maybe taken to finish the job?(The images are about one million in count and 250GB in size totally).

Thanks in advance.



Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About