I ran the following code on a w2k system on Friday. It looks like it died on Saturday night about 1/3 way through. Why, I don't know, although the drive I'm running it against is massive. The system had a low virtual memory error when I came in this morning.

I'm writing out to a text file immediately, so I don't know how there was a virtual memory problem. Can anyone else see the issue?

Thanks.

# Finds the owners of files on the share, finds their size, and prints + them to globalowners.txt # 7/27/01 # Prints [owner][file][file size (KB)][acess time code][last file acce +ss][modify time code][last modified date] # To effectively sort times, sort by the timecodes. # Import the text file to excel for best results use strict; use Win32::Perms; use File::Find; my $dir1='//server/share'; open OUT, ">shareowners.txt"; print OUT "Owner\tFile\tSize(KB)\tAccessTimeCode\tLast Accessed\tModif +yTimeCode\tLast Modified\n"; find ({wanted => \&wanted, no_chdir=>1}, $dir1); close OUT; sub wanted { if (-f){ my $File = new Win32::Perms("$_")||die; my $Own=$File->Owner(); my @stat=stat; my $kbytes = $stat[7]/1024; my $access = localtime($stat[8]); my $modify = localtime($stat[9]); print OUT "$Own\t$\$_\t$kbytes\t$stat[8]\t$access\t$stat[9]\t$ +modify\n"; } }

-OzzyOsbourne


In reply to Virtual memory issue with File::Find? by OzzyOsbourne

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.