Date: Sun, 16 Jun 1996 09:29:56 PDT From: "Marty Leisner" <leisner@sdsp.mc.xerox.com> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: current@freebsd.org Subject: Re: how to find size of special file Message-ID: <9606161629.AA21697@gemini.sdsp.mc.xerox.com> In-Reply-To: Your message of "Sat, 15 Jun 1996 03:44:28 PDT." <199606151044.DAA00936@silvia.HIP.Berkeley.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
>nor the less obvious > > int fd ; > struct stat sb ; > fd = open(filename, ...) ; > size = lseek(fd, 0, SEEK_END) ; > >work on special files, even if they are disk partitions. (They both >work on regular files....) > >Satoshi Hmm... wc filename will work...did the open work? What errno is it returning?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9606161629.AA21697>