Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: <3F0A3430.276CF8A3@dessent.net> Date: Mon, 07 Jul 2003 20:02:08 -0700 From: Brian Dessent 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: <3F0A045D DOT 7030009 AT alltel DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ken Dibble wrote: > I can't make sense of this. > > $ find ./ -mtime -1 -print | wc -l > 55 > > $ find ./ -mtime -1 -exec ls -l '{}' \; | wc -l > 2046 Try running "find . -mtime -1" (-print is assumed) and look at the output. In addition to files, find returns directories that match the criteria. Add "-type f" if you only want files. If you invoke "ls -l" on a directory it prints the directory's contents rather than printing its name -- you can supply it with "-d" if you wish for it to list directory names insted of contents. I think that's what you are seeing here. 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/