Cat a directory

Warren Block wblock at wonkity.com
Fri Sep 19 07:41:39 PDT 2003


On Thu, 19 Sep 2003, Karlsson Mikael HKI/SOSV wrote:

> I personally think that some of these tests should be added to the
> real distributable version of cat that comes with FreeBSD cause I
> can't be the only one that this bugs. I mean what could a little more
> code hurt to the program since cat isn't supposed to read binary
> files.

Says who?  cat works fine on binary files.  The problem you are having
is that people are using cat to *display* files.  "Fixing" that problem
could break cat for its more standard use: cat binaryfile | filter |
etc.

> Other *NIX systems seem to have done this to their cat program so why
> can't FreeBSD?

See above.

> and why is this already done to less and not cat?

less is made to display files.  It's the correct tool for the job.

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-questions mailing list