in reply to Re: Memory Question
in thread Memory Question

While this could be done in the shell, I have found personnally that Perl get things done slightly faster and cleaner than spawning massive chains of shell commands. Its also easier to collect all the info and compare / process it in perl than with shell utils, but then again I am not shell guru by any means.

Someone pointed out File::Find which will get you rolling, and will be slightly kinder on your system than a 'find' would be. Also there are some decent chapters in the panther book (Advanced Perl Programming) that deal with efficiently comparing 2 hashes, and pulling out the differences between them.

Best of luck

/* And the Creator, against his better judgement, wrote man.c */

Replies are listed 'Best First'.
Re: Re: Re: Memory Question
by Limbic~Region (Chancellor) on Feb 21, 2003 at 22:40 UTC
    While I LOVE Perl, I disagree in this case.

    If the only thing needing to be checked is permissions, the following would suffice:

    find / -exec ls -l {} \; > /tmp/pass1 find / -exec ls -l {} \; > /tmp/pass2 diff /tmp/pass1 /tmp/pass2
    Of course you would tailor the find command as PrimeLord indicated (only get specific files with permissions).

    In my experience, this specific task is faster/easier/efficient using Unix commands.

    Cheers - L~R