Re: RFE: find <path> -d -size 0 => doesn't find empty directories
- Date: Wed, 31 Oct 2018 18:16:37 -0700
- From: Mark Geisert <mark@xxxxxxxxxx>
- Subject: Re: RFE: find <path> -d -size 0 => doesn't find empty directories
L A Walsh wrote:
Something I can use on my /tmp files on linux is a find command:
find /tmp -size 0 -delete
to delete zero-len-files or empty-directories in /tmp.
Unfortunately, due to directories really not being in the user
disk data space, but in the MFT(zone) (I think), the size
comes back as zero ('0') for directories.
Would it be possible (if not problematic) for the cygwin
emulation layer to return some non-zero value if the
directory has actual entries in it (ignoring structural
values like "." and "..")? Maybe return as 'size' either
a dummy number proportional to #entries (like 10*#entries),
or something like summing up actual number (+1) of characters
in the file list?
Would that be difficult to do, or add?
Try 'find -d -empty'
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple