[Info-vax] Request description of UFS for VMS person

Bob Eager rde42 at spamcop.net
Tue Apr 21 14:59:04 EDT 2009


On Tue, 21 Apr 2009 18:30:13 UTC, billg999 at cs.uofs.edu (Bill Gunshannon)
wrote:

> In article <gsl18u$bja$6 at naig.caltech.edu>,
> 	glen herrmannsfeldt <gah at ugcs.caltech.edu> writes:
> > Bill Gunshannon <billg999 at cs.uofs.edu> wrote:
> > (snip on od or cat on unix directories)
> >  
> >> Current version of dd won't do it either.  Of course, you could grab the
> >> source to cat and write your own version that ignores it being a directory.
> >> Or just copy the stripped down version fromt he K&R C book.  :-)
> > 
> > I believe the failure is at the system call level, propagated
> > back through errno and perror.  Likely the programs don't know
> > or care that it is a directory, but just that the open fails.
> 
> Seems unlikely.  Always could "cat" a directory in the past because,
> after all, it, too, is just a stream of bytes.  :-)  For the hell of
> it, tonite, I will take a look at the source for the current version
> of cat.  I think I will find a test for directories and a deliberate
> fail if it is.

Hmmm....my FreeBSD systems allow one to 'cat' a directory, as I would 
expect.

I just tried on a SunOS system at work, and 'cat' fails on a directory. 
I don't have the source for that, but I wrote a test program and 
successfully opened a directory with that.

So it does seem to be, at least on SunOS, something in the application 
rather than the API.

-- 
Bob Eager




More information about the Info-vax mailing list