Subject: Re: CVS commit: src/bin/ls
To: Jan Schaumann <>
From: Valeriy E. Ushakov <>
List: source-changes
Date: 09/15/2003 01:23:22
On Sun, Sep 14, 2003 at 19:16:08 +0000, Jan Schaumann wrote:

> Module Name:	src
> Committed By:	jschauma
> Date:		Sun Sep 14 19:16:08 UTC 2003
> Modified Files:
> 	src/bin/ls: extern.h ls.1 ls.c ls.h print.c util.c
> Log Message:
> Implement '-b' option, which, following FreeBSD, Linux and (I think) Solaris
> prints octal escapes for nongraphic characters.

The logical set shoule include -w, and, probably, -B.

To quote FreeBSD ls(1):

     -B      Force printing of non-printable characters (as defined by
             ctype(3) and current locale settings) in file names as \xxx,
             where xxx is the numeric value of the character in octal.

     -b      As -B, but use C escape codes whenever possible.

     -q      Force printing of non-graphic characters in file names as the
             character `?'; this is the default when output is to a terminal.

     -w      Force raw printing of non-printable characters.  This is the
             default when output is not to a terminal.

     The -B, -b, -w, and -q options all override each other; the last one
     specified determines the format used for non-printable characters.

SY, Uwe
--                         |       Zu Grunde kommen            |       Ist zu Grunde gehen