Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ucbvax!janus.Berkeley.EDU!ashish From: ashish@janus.Berkeley.EDU (Ashish Mukharji) Newsgroups: comp.unix.questions Subject: Deleting directories Message-ID: <37481@ucbvax.BERKELEY.EDU> Date: 9 Jul 90 21:58:39 GMT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: ashish@janus.Berkeley.EDU.UUCP (Ashish Mukharji) Organization: University of California, Berkeley Lines: 15 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@ucbvax.BERKELEY.EDU #43 Casa Zimbabwe 2422 Ridge Road Berkeley CA 94709 (415) 549-4962