From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1425 invoked by alias); 27 Feb 2012 17:51:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16802 Received: (qmail 10556 invoked from network); 27 Feb 2012 17:51:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DOS_RCVD_IP_TWICE_B, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at lorien.comfychair.org designates 173.8.144.98 as permitted sender) Date: Mon, 27 Feb 2012 09:35:48 -0800 From: Danek Duvall To: TJ Luoma Cc: zsh-users@zsh.org Subject: Re: How to find owner of file or folder? Message-ID: <20120227173548.GA26712@lorien.comfychair.org> Mail-Followup-To: Danek Duvall , TJ Luoma , zsh-users@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2010-04-22) On Mon, Feb 27, 2012 at 11:55:14AM -0500, TJ Luoma wrote: > This is the only way that I know of to get the username who owns a > certain file or folder, such as /usr/local/ > > command ls -ld /usr/local | awk '{print $3}' > > (or `ls -dn` if you want the number instead of the name) > > but that seems fairly inelegant. > > Is there a better way? The stat builtin, from the zsh/stat module (see zshmodules(1). Or the similar utility of the same name, part of GNU coreutils. Danek