From owner-FreeBSD-users-jp@jp.freebsd.org  Mon Mar 30 11:36:46 1998
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta7/8.7.3) id LAA28838
	Mon, 30 Mar 1998 11:36:46 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta7/8.7.3) with ESMTP id LAA28832
	for <FreeBSD-users-jp@jp.freebsd.org>; Mon, 30 Mar 1998 11:36:44 +0900 (JST)
Received: from aja.nt.is.dnp.co.jp (aja.nt.is.dnp.co.jp [10.44.208.191]) by aries.dnp.co.jp (8.8.8+2.7Wbeta7/3.6W/IOC-2.3) with SMTP id LAA10794 for <FreeBSD-users-jp@jp.freebsd.org>; Mon, 30 Mar 1998 11:36:42 +0900 (JST)
Received: (qmail 13304 invoked from network); 30 Mar 1998 02:36:41 -0000
Received: from localhost (127.0.0.1)
  by localhost with SMTP; 30 Mar 1998 02:36:41 -0000
To: FreeBSD-users-jp@jp.freebsd.org
In-Reply-To: Your message of "Mon, 30 Mar 1998 11:10:51 +0900"
	<199803300210.LAA21763@xxx.fct.kgc.co.jp>
References: <199803300210.LAA21763@xxx.fct.kgc.co.jp>
X-Mailer: Mew version 1.92.4 on Emacs 20.2 / Mule 3.0 (MOMIJINOGA)
X-fingerprint: 49 1B 1A FA C4 E0 18 2A  61 E2 34 52 96 59 4B 8B
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <19980330113640O.noroi@aja.nt.is.dnp.co.jp>
Date: Mon, 30 Mar 1998 11:36:40 +0900
From: IKEDA Kenji <noroi@nt.is.dnp.co.jp>
X-Dispatcher: imput version 971024
Lines: 67
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=24]
X-Sequence: FreeBSD-users-jp 26562
Subject: [FreeBSD-users-jp 26562] Re: samba =?iso-2022-jp?B?GyRCJE44IjhCJEgbKEI=?=
 tmp =?iso-2022-jp?B?GyRCJEskRCQkJEYbKEI=?=
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

On Mon, 30 Mar 1998 11:10:51 +0900, candy@fct.kgc.co.jp wrote:

> r $B$,$"$l$P%U%!%$%k0lMw$O$H$l$k$H;W$$$^$9$,!#(B

$B$=$&$G$9$h$M!#$G$b!"(B3.0-971208-SNAP $B$N(B /bin/ls $B$G$O8+$($^$;$s!#(B
$B;n$5$l$?4D6-$O(B FreeBSD $B$G$9$+(B? /bin/ls $B$G$9$+(B?

$B%G%#%l%/%H%j$,FI$a$k$s$G(Breaddir$B$GFI$a$k$s$@$1$I!"$J$<$+(B /bin/ls $B$O%(%i!<(B
$B$K$b$J$i$:JV$C$F$-$^$9!#(B

$ cat readdir.c
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>

char *progname;

main (argc, argv)
     int argc;
     char *argv[];
{
  DIR *dp;
  struct dirent *dirp;

  progname = *argv;
  while (--argc)
    if ((dp = opendir (*++argv)) == NULL)
      {
        fprintf (stderr, "%s: ", progname);
        perror (*argv);
      }
    else
      {
        while ((dirp = readdir (dp)) != NULL)
          printf ("%*s\n", dirp->d_namlen, dirp->d_name);
        closedir (dp);
      }
  return 0;
}
$ cc readdir.c -o readdir
$ ls -ld tmp
dr--------  5 noroi  human  2048 Mar 20 18:05 tmp
$ ls -a tmp
$ echo $?
0
$ ./readdir tmp
