Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!teknowledge-vaxc!sri-unix!quintus!sun!yavin!mike_s From: mike_s@yavin.uucp (Mike Sullivan) Newsgroups: comp.unix.wizards Subject: Re: directory copying with cp; broken? Summary: Directory handling Message-ID: <10073@yavin.uucp> Date: 7 Oct 88 18:42:32 GMT References: <40@ausonics.OZ> <30506@bbn.COM> <506@quintus.UUCP> Reply-To: mike_s@sun.UUCP (Mike Sullivan) Organization: Sun Microsystems, Milpitas Lines: 24 In article <506@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >In article <30506@bbn.COM> mesard@bbn.com (Wayne Mesard) writes: >>Indeed. And more generally, a consistent way of handling directories >>(i.e. directory files) needs to be established. In SunOS 3.4: >> head, tail, cat ==> {works} > >Are you sure about that? In both SunOS 3.2 and SunOS 4.0, > % cat . > cat: read error: Is a directory >In straight 4.2BSD, if you read a directory, you get the file names &c, >but in SunOS 3.x and 4.x, a directory always appears to be empty. So >"wc $Directory" in SunOS will always print "0 0 0". I am running SunOS 4.0, and if I 'cat .' I get the contents of the directory (file names, etc.), not a read error. "wc ." also works, printing "1 7 1024" (for a 2 block directory). Both also work under 3.5. There is a portable directory interface, and you are not supposed to be able to directly open directories (great sentence), but apparently you still can. Mike sun!yavin!mike_s