Skip to main content
4 events
when toggle format what by license comment
Jun 21, 2015 at 3:35 comment added G-Man Says 'Reinstate Monica' Or use find (starting-directory) -depth -type d ....  The -depth option tells find to do something like reverse the order of the output — it goes to the deepest directory levels first, then works its way back up.
Sep 12, 2009 at 1:52 comment added Anthony Giorgio I never knew about "tac" before. That's really nifty!
Sep 11, 2009 at 22:56 comment added Ryan C. Thompson Not necessarily. That might not delete directories with only empty subdirectories. You might have to reverse it. find -type d -print0 | tac | xargs -0 rmdir
Sep 11, 2009 at 21:50 history answered Anthony Giorgio CC BY-SA 2.5