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

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Lloyd Zusman <ljz AT asfast DOT com>
Subject: Re: Changing Windows "hidden" and "system" attributes?
Date: Sat, 28 Oct 2006 01:41:11 +0000 (UTC)
Lines: 56
Message-ID: <loom.20061028T031119-796@post.gmane.org>
References: <loom DOT 20061026T132712-881 AT post DOT gmane DOT org> <ehqsbl$dpe$1 AT sea DOT gmane DOT org> <loom DOT 20061027T131039-458 AT post DOT gmane DOT org> <eht7p9$ujt$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Thorsten Kampe <thorsten <at> thorstenkampe.de> writes:

> * Lloyd Zusman (Fri, 27 Oct 2006 11:49:51 +0000 (UTC))
> >
> > Cygwin offers the "-W, --windows" extension to ps and the regtool,
> > getfacl, and setfacl commands (to name but three) which offer
> > Windows-specific (i.e., non-Linux) capabilities.
> 
> I see your point regarding get/setfacl and regtool. As far as I know 
> these offer a different approach and somewhat different functionality 
> than cacls/xcacls and reg.exe. There's also a Cygwin ping.
> 
> The question is here: what could a Cygwin attrib do (or do 
> differently) that the native attrib does not?

Well, for one thing, things like this don't work:

  find . -type f -print | xargs attrib

Yes, I know that I could put a wrapper script around attrib to apply
cygpath to the argument, to name but one of several ways to solve this.
In fact, I have already done this, thereby making my own cygwin-compliant
analog to attrib.

Remember that I'm not asking that anyone invent a cygwin utility that does
what attrib does.  I was just wondering _if_ something like that existed.
But now, since I know that there is no such thing in cygwin, I'll just
continue to make use of the wrapper-script hack^H^H^H^Hworkround.

Thanks for your opinions and feedback.

P.S. -- Here's my script.  I call it "cattrib" (I'm posting via gmane,
so forgive me if the indentation is screwed up):

#!/bin/bash

signaled() {
  echo -e '\r!!! aborted'
  exit 1
}

trap 'signaled' 1 2 3 15

for arg
do
  echo $(cygpath --unix $(attrib $(cygpath --windows ${arg})))
done

exit 0


-- 
 Lloyd Zusman
 ljz AT asfast DOT com
 God bless you.



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

- Raw text -


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