From owner-freebsd-questions@FreeBSD.ORG Sun Mar 16 00:49:51 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A57E31065672 for ; Sun, 16 Mar 2008 00:49:51 +0000 (UTC) (envelope-from pprocacci@datapipe.com) Received: from fmailhost01.isp.att.net (fmailhost01.isp.att.net [204.127.217.101]) by mx1.freebsd.org (Postfix) with ESMTP id A294B8FC12 for ; Sun, 16 Mar 2008 00:49:51 +0000 (UTC) (envelope-from pprocacci@datapipe.com) Received: from [10.5.21.122] (adsl-241-161-249.bna.bellsouth.net[74.241.161.249]) by isp.att.net (frfwmhc01) with ESMTP id <20080316004950H0100mqkrbe>; Sun, 16 Mar 2008 00:49:50 +0000 X-Originating-IP: [74.241.161.249] Message-ID: <47DC6E92.1000300@datapipe.com> Date: Sat, 15 Mar 2008 19:49:22 -0500 From: "Paul A. Procacci" User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Modulok References: <64c038660803151511r6ae6d229v484769cfe38043bc@mail.gmail.com> In-Reply-To: <64c038660803151511r6ae6d229v484769cfe38043bc@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Can one list permission bits numerically... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 00:49:51 -0000 Modulok wrote: > Perhaps I missed it somewhere in the man page, but is there a way to > list files with their permission bits displayed as numeric (octal, as > in chmod(1)), instead of symbolic? Something like: > > ls -lF -imaginaryFlag > > 0755 4 Modulok Modulok 512 Dec 17 18:39 dir1/ > 0644 1 Modulok Modulok 101786 Feb 23 05:53 file1 > 0644 1 Modulok Modulok 140097 Feb 13 23:38 file2 > .... > > Thanks. > -Modulok- > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > Maybe something like this will suit you: stat -f "%p %l %u %g %z %m %N" * It produces output similar to the following: 100755 1 0 0 64 1201845218 blah The fields that I choose are in the man page, so it should be easy reading, and is pretty close to `ls -l`. As for as `ls` having this ability, it doesn't. Cheers.