No such thing as a small change | |
PerlMonks |
Re: Re (tilly) 1: Limitations to chmod and performanceby arhuman (Vicar) |
on Nov 12, 2001 at 18:48 UTC ( [id://124835]=note: print w/replies, xml ) | Need Help?? |
Working with a list of files and letting chmod do the loop is probably faster than looping over chmod statements. But if your list of files is very large, you could run out of memory. (Very unlikely, but there is a theoretical limit there.) I'll furthermore add that, with many implementations of 'chmod' the number of args is limited, and you'll probably hit a 'arg list too long' error way before you exhaust your memory... (For example on my linux box I'm limited to around 12900 files as arguments...) To my mind you'd definitly better use the one-at-a-time strategy... Note : This problem also occurs with a lot of others file related tools : rm, ls... "Only Bad Coders Code Badly In Perl" (OBC2BIP)
In Section
Seekers of Perl Wisdom
|
|