From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126314 invoked by alias); 18 Dec 2018 16:19:57 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 126296 invoked by uid 89); 18 Dec 2018 16:19:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=fourth, H*Ad:D*edu, HContent-Transfer-Encoding:8bit X-HELO: mailsrv.cs.umass.edu Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Dec 2018 16:19:55 +0000 Received: from [128.119.40.238] (csvpn14.cs.umass.edu [128.119.40.238]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id CAA2E401A595; Tue, 18 Dec 2018 11:19:53 -0500 (EST) Reply-To: moss@cs.umass.edu Subject: Re: Exclude System entries with "ls" or "find" To: cygwin@cygwin.com References: <5c184377.1c69fb81.7df8f.9525@mx.google.com> <20181218081347.GD28727@calimero.vinschen.de> <177791e4-5933-a0f0-341c-75b8b19437ea@cs.umass.edu> <6d2b6327-96f3-9079-9cce-691999f63933@gmail.com> From: Eliot Moss Message-ID: Date: Wed, 19 Dec 2018 01:10:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <6d2b6327-96f3-9079-9cce-691999f63933@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00168.txt.bz2 On 12/18/2018 10:51 AM, cyg Simple wrote: > On 12/18/2018 7:58 AM, Eliot Moss wrote: >> However, you can run DOS attrib from Cygwin, just like any Windows program, >> and parse its output.  So it would be possible to use a combination of Windows >> and Cygwin tools to do what you're seeking, though not necessarily with high >> efficiency, etc. >> > > That depends on the Windows program and whether or not it the data gets to Cygwin. I was referring to processing the textual output of the DOS command program 'attrib'. Cygwin has a wide range of POSIX style text processing tools and scripting languages. This is clearly possible. For example, if I run: attrib | grep '^...S' I get the output from attrib (all files in the current directory), filtered by those lines where the fourth character is S, which is the lines for the file with the SYS attribute set. Further parsing could extract the file name, and then (if you like) you can apply cygpath to it to convert the name from Windows syntax to POSIX, etc. Best - EM -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple