delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/02/27/10:07:05

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF5663858420
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1709046423;
bh=xwrzYTa/s7HgsTiH/2wu06vYhOg7kJg7Ltg3IuT2JoU=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=d+7WnI+h7EYQVpDc6luCthe4I8/Ui2vOmV8wCD7k2mhZcuvQDQTQuHIG1NmV1V55p
9jcO+qNolDLQorfiBSLBNdvk/H3vjIRqPdG7y6c8pEekW7JuytAEtLGWwf0L8z3dHw
B7J/RrZX5WN0i7D1wnYEe41jlIA8HKwhSrRmknbU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BF03385840B
Date: Tue, 27 Feb 2024 16:05:45 +0100
To: cygwin AT cygwin DOT com
Subject: Re: How can I get the group SID for a file in cmd.exe (powershell is
not an option)?
Message-ID: <Zd36SYPoblmPw4OX@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CALXu0UcSPbe69=1n6rfKb-8hxNYig3=cJh0R=0Xu6S1jeDMDpg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CALXu0UcSPbe69=1n6rfKb-8hxNYig3=cJh0R=0Xu6S1jeDMDpg@mail.gmail.com>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Feb 27 15:41, Cedric Blancher via Cygwin wrote:
> Good afternoon!
> 
> How can I get the group SID for a file in cmd.exe (powershell is not an option)?
> Is it possible to add an option to ls -l to list the user/group SIDs too?

No, but you can use Cygwin tools:

 getent -w group $(ls -gn foo | awk '{print $3}') | awk -F: '{print $4}'


Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019