zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <Peter.Stephenson@csr.com>
To: <zsh-users@zsh.org>
Subject: Re: How to find owner of file or folder?
Date: Mon, 27 Feb 2012 17:37:49 +0000	[thread overview]
Message-ID: <20120227173749.36fa1d79@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CADjGqHuYfi4h+2OgNouuc3RXpHYexOnqr0ExLUax7H+uFkQg3g@mail.gmail.com>

On Mon, 27 Feb 2012 11:55:14 -0500
TJ Luoma <luomat@gmail.com> 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?

% zmodload -F zsh/stat b:zstat
% zstat -s +uid /usr/local/bin/zsh
root

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog


  parent reply	other threads:[~2012-02-27 17:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 16:55 TJ Luoma
2012-02-27 17:31 ` Dan Nelson
2012-02-27 18:30   ` TJ Luoma
2012-02-27 18:38     ` Dan Nelson
2012-02-27 19:55       ` TJ Luoma
2012-02-27 17:35 ` Danek Duvall
2012-02-27 17:37 ` Peter Stephenson [this message]
2012-02-27 18:18   ` TJ Luoma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120227173749.36fa1d79@pwslap01u.europe.root.pri \
    --to=peter.stephenson@csr.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).