edjcb@earth.lerc.nasa.gov (Scooter) (09/25/90)
I need a utility that will walk the tree structure from a specified point down and execute commands on each file it finds. I'd like to avoid the pipe approach to this -- piping a directory list output into something that will execute the desired command. I already have RESWALK to do that. What I really want to do is delete large chunks of files in the tree and ideally remove the resulting empty directories. Any suggestions would be appreciated by mail. Thanks a 1,000,000 -- Jeff Jeff Brown (216) 433-3888 edjcb@scivax.lerc.nasa.gov
sonny@charybdis.harris-atd.com (Bob Davis) (09/26/90)
In article <1990Sep25.151041.9590@eagle.lerc.nasa.gov> edjcb@earth.lerc.nasa.gov writes: >I need a utility that will walk the tree structure from a specified point >down and execute commands on each file it finds. I'd like to avoid the >pipe approach to this -- piping a directory list output into something >that will execute the desired command. I already have RESWALK to do that. > >What I really want to do is delete large chunks of files in the tree and >ideally remove the resulting empty directories. Any suggestions would >be appreciated by mail. Thanks a 1,000,000 -- Jeff > >Jeff Brown (216) 433-3888 >edjcb@scivax.lerc.nasa.gov Maybe the UNIX-like utility, rm, with the -r option is what you want. 'rm -r directory-name' will REMOVE EVERYTHING (Careful!) including files AND directories from (and including) 'directory-name' on down in the tree. Also, SWEEP, from the PC Magazine utilities is useful for executing a given command in every directory. Good luck, ______________________________________________________________________________ Bob Davis, UofALA'66 \\ INTERNET : sonny@trantor.harris-atd.com | _ _ | Harris Corporation, ESS \\ UUCP : ...!uunet!x102a!trantor!sonny |_| |_| | | Advanced Technology Dept.\\ AETHER : K4VNO |==============|_/\/\/\|_| PO Box 37, MS 3A/1912 \\ VOICE : (407) 727-5886 | I SPEAK ONLY | |_| |_| | Melbourne, FL 32902 \\ FAX : (407) 729-2537 | FOR MYSELF. |_________|