Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!thep.lu.se!bengtl From: bengtl@thep.lu.se (Bengt Larsson) Newsgroups: comp.lang.perl Subject: Re: Useful "du" (was Re: How about building in directory-tree-walking?) Message-ID: <9003300249.AA14755@thep.lu.se> Date: 30 Mar 90 02:50:48 GMT References: <54235@bbn.COM> Sender: daemon@ucbvax.BERKELEY.EDU Organization: Lund Institute of Technology, Sweden Lines: 25 In article <54235@bbn.COM> clements@BBN.COM writes: [the "used" perl script here] I'm a beginner with Perl, so forgive me! I tried the "used" script and it doesn't work for me. The error seems to be in these two lines: > ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, > $atime,$mtime,$ctime,$blksize,$blocks) = lstat($_); When I run this through the debugger (perl -d) all the variables get defined, except "$blksize" and "$blocks", which appear to be empty (nothing shows in the "p" command). Of course, the sum of blocks reported will then be 0 (zero) for all directories. Not very useful. This was with Perl patchlevel 15 on a 3B2 running System V 3.2. Standard cc used for compile (no shared libraries). Is this a bug maybe? Regards, -- Bengt Larsson - Theor. Psysics, Lund University, Sweden - bengtl@thep.lu.se