Re: find starting from leaf rather than root

2010-06-14 Thread Eric Blake
On 06/13/2010 09:17 AM, James Youngman wrote: > On Sun, Jun 13, 2010 at 3:24 PM, Peng Yu wrote: >> I know that 'find' start from a dir then recursively check subdirectories. >> >> But I have an application, in which I need to check the start >> directory first then check the parent directory (I wa

Re: How to find all the directories that don't have any file in it?

2010-06-14 Thread Eric Blake
On 06/11/2010 03:47 PM, Peng Yu wrote: > Hello, > > I want to find all the directories that do not have any file in them > (there can be directories in them). Could you show me how to do it? Interesting challenge. First, I created a test hierarchy: $ ls -RF .: a/ b/ d/ ./a: ./b: c/ f ./b/