From owner-freebsd-questions Fri Jul 7 11:17:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from telinco.net (internal.mail.telinco.net [212.1.128.4]) by hub.freebsd.org (Postfix) with ESMTP id 732CC37BC63 for ; Fri, 7 Jul 2000 11:17:28 -0700 (PDT) (envelope-from Peter.McGarvey@telinco.net) Received: from pilchards.telinco.net ([212.1.128.253] helo=telinco.net) by telinco.net with esmtp (Exim 3.02 #1) id 13Acgo-000Exs-00; Fri, 07 Jul 2000 19:17:26 +0100 Message-ID: <39661EB5.257D7CD0@telinco.net> Date: Fri, 07 Jul 2000 19:17:25 +0100 From: Peter McGarvey Reply-To: Peter.McGarvey@telinco.net Organization: Telinco X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: eric.boucher24@sympatico.ca Cc: FreeBSD Subject: Re: Question about ls -b References: <396603F5.577B50B2@sympatico.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Boucher Eric wrote: > > Hi, > > I wanted to know something about the command : ls -b > > It is suppose to show the non printable character in the form /ddd > in hexadecimal. My man page says: -b As -B, but use C escape codes whenever possible. and -B Force printing of non-graphic characters in file names as \xxx, where xxx is the numeric value of the character in octal. > > But doesn't seem to put the exact value by converting the hexadecimal > number to the So it's not hex, it's octal > > ASCII code. For example, if a name of one of my file contains the ASCII > character 130, when I type the ls -b command, the output show me : > /202 , which is the number 516, not 130 (maybe it's not the exact > number, but it's close to it, I do it by memory, it's only to show that > it's not the correct number.) > 130 -> 82 in hex -> 202 in octal so it appears to be working fine.... I would say RTFM, but I won't as I don't want to start a flame war ;-) -- TTFN, FNORD Peter McGarvey, Unix Administrator Network Operations Center, Telinco Limited To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message