This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Changing Windows "hidden" and "system" attributes?

Thorsten Kampe <thorsten <at>> 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):


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

trap 'signaled' 1 2 3 15

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

exit 0

 Lloyd Zusman
 God bless you.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]