in reply to Limitations to chmod and performance

Technically, the underlying chmod(2) system call only takes two arguments (the mode and the path). So no matter how many filenames you pass to perl's chmod it's going to devolve into multiple system calls somewhere underneath anywhere.

  • Comment on Re: Limitations to chmod and performance

Replies are listed 'Best First'.
Re: Re: Limitations to chmod and performance
by stefp (Vicar) on Nov 13, 2001 at 06:38 UTC
    On a linux box, this is easily illustrated by the following experiment (better carried on the /tmp directory):

     strace -e trace=file perl -e 'chmod 0777, "a".."z"' 2>&1 | tail -26

    One will see 26 chmod system calls.

    -- stefp