Deleting directories

Ashish Mukharji ashish at janus.Berkeley.EDU
Tue Jul 10 07:58:39 AEST 1990


Recently, I had to remove all of a user's files older than a 
certain date.  That was easily accomplished with find(1), but deleting the 
resulting (empty) directory structure presents a greater problem.  The user's 
home directory is the root of a large, mostly empty directory tree.  I want
to delete all directories that do not contain any regular files - find starts
with . and works its way down (inorder).  What I need is a way to do a 
postorder traversal of the directory structure.  Is there a simple way, short 
of writing a C routine?

-ashish

Tuberculosis.  It's what they used to call consumption.
--------------------------------------------------------------------------
 . . !ucbvax!janus!ashish		  ashish%janus at ucbvax.BERKELEY.EDU
#43 Casa Zimbabwe    2422 Ridge Road   Berkeley CA 94709    (415) 549-4962



More information about the Comp.unix.questions mailing list