delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/08/08:33:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <3F0AB9FD.236D42EE@dessent.net>
Date: Tue, 08 Jul 2003 05:33:01 -0700
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
X-Accept-Language: en,en-US
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: find -exec oddity
References: <5 DOT 2 DOT 1 DOT 1 DOT 2 DOT 20030707171122 DOT 0206bd98 AT pop DOT sonic DOT net> <3F0AB445 DOT 7090105 AT alltel DOT net>

Ken Dibble wrote:

> As you can see, there are indeed some directories, but a whole bunch of
> files
> which shouldn't be there as well.
> 
> The big question now is why are some files considered directories?

I don't see the confusion here.  You're feeding to "ls -l" the
parameters "./" , "./files to backup.txt" , and "./idiot.txt" which are
the results of find.  "./" is a directory, so ls prints its contents not
its name, that's why you see listings for all the files in the current
directory, followed by listings for "files to backup.txt" and
"idiot.txt".  When you add "-d" to ls, you get just three lines of
output, corresponding to the three things that find found.  How is this
confusing?

Brian

--
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