public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RFE: find <path> -d -size 0 => doesn't find empty directories
@ 2018-10-31 23:02 L A Walsh
  2018-11-01  0:02 ` Norton Allen
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: L A Walsh @ 2018-10-31 23:02 UTC (permalink / raw)
  To: cygwin

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?

Thanks much,
-linda



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-11-02 14:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 23:02 RFE: find <path> -d -size 0 => doesn't find empty directories L A Walsh
2018-11-01  0:02 ` Norton Allen
2018-11-01  1:16 ` Mark Geisert
2018-11-01  4:40   ` Mark Geisert
2018-11-01 16:27     ` (SOLVED) " L A Walsh
2018-11-02  5:33       ` Mark Geisert
2018-11-01 16:20 ` Andrey Repin
2018-11-02  5:05   ` Brian Inglis
2018-11-02 14:05     ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).