http://www.perlmonks.org?node_id=1020926


in reply to copy files based on name

If it works, it works. Don't repair it if it ain't broken.

But you question "the efficiency". Does it go too slow, does it consume too much system resources, ...?

The rsync process is usually a rather efficient process.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Replies are listed 'Best First'.
Re^2: copy files based on name
by raggmopp (Novice) on Feb 27, 2013 at 18:06 UTC

    I would gauge the performance as OK, maybe even so-so or marginal. With a load on the system it does slow down even more.

    Agreed, rsync is usually the choice. I'm more concerned with the processing to place the files in their appropriate locations.

      Even if you found something faster than the substr function, the benefits will pale when comparing with the time rsync has taken.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics