[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grep --directories option (POSIX)
From: |
Paul Eggert |
Subject: |
Re: Grep --directories option (POSIX) |
Date: |
02 Jun 2003 12:38:44 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Stepan Kasal <address@hidden> writes:
> The exception are sytems where a file can be ``text file'' and directory
> at once. (I haven't heard about any such system except GNU/Hurd.)
But even on (say) Solaris, a directory might be a text file, since its
contents might happen to be valid text. It's not likely, but I assume
it's possible, at least on some of the filesystem types (UFS, HSFS,
whatever). And if a Hurd system is exporting a directory to Solaris
via NFS or CIFS, the Solaris 'grep' will indeed see a directory that
is a text file.
Unless an OS can guarantee that no directory will ever be a text file,
we can't make --directories=skip the default on that OS. And since we
know of at least one OS where directories can be text files, we can't
make --directories=skip the default everywhere while conforming to
POSIX; of the current options, only --directories=read conforms to
POSIX everywhere.