NT vs Unix perl nits

Arthur Corliss corliss at sinbad.net
Thu Apr 1 16:42:47 CST 1999


On Thu, 1 Apr 1999, Roxanne Reid-Bennett wrote:

> <shrug> I didn't even start this path, Jim found an example of how
> to traverse directories in the O'Reilly Perl book (v4).  Playing with
> stat, nlink gives back exactly how many directory entries are in the DIR
> (including "." and "..") every time. So... given no other more
> illuminating documentation on "stat" <g> 

Well, if we find out one way or the other, I want to know.  :-)  Good info.

> Frankly I haven't played around with file systms under Unix or NT, so
> which does what is... outside my knowledge base.

Shortcuts are just simple files.  ASCII under the original Win95, but binary
under NT (they store more than the path, but also the host name of the
creating computer).

> Jim was using it as a shortcut to finding out whether a subtraversal was
> even necessary (e.g. recursively processing dirs).  He had to open the
> dir later for processing the contents, so he moved the recursion to
> there if the file was a -d type.
> 
> He was also suitably impressed with the ease with which perl dealt with
> the string substitutions he was having to make.
> 
> Example outputs of "stat" looking at the same file
> 
> Unix:
>     dev: 2081 inode: 802817 mode: 16877 nlink: 10 uid:501 mtime: 501
>     ctime: 0 blksize: 1024 blocks:923005473   
> NT:
>     dev: 7 inode: 0 mode: 16895 nlink: 1 uid:0 mtime: 0 
>     ctime: 7 blksize: 0 blocks:923005504

Hmm, looks like Jim's right on the nlinks, then, the man page only states hard
links, and isn't the max on that 4?

	--Arthur Corliss
	  Bolverk's Lair -- http://www.odinicfoundation.org/arthur/
	  "Live Free or Die, the Only Way to Live" -- NH State Motto




More information about the Anchorage-pm mailing list