is there a way to traverse a directory structure & execute a command
Is there a way to traverse a directory structure & execute a command for each directory it enters? Or maybe every file in each directory? The command needs to be a bash script I'd write.
What I'm trying to do is walk (a part of) a directory structure of a filesystem from system A mounted on system B & gzip the files onto another HD on system B, but sleeping between each file so it doesn't load down the network access to system A's files. Nice'ing the job running on system B wouldn't work as there's really nothing running on B most of the time. In fact there's nothing much running on either systems, just serving files.
Perhaps I misunderstand nice (& how servers work) but as I read it, it just lowers priority of that job, and Windows machines accessing the files on A would be unknown/unseen by B as a process that it should be lower than.
I know I can write a bash script that will traverse the directory structure, but I figure someone's already done it & probably better than I could, so why reinvent the wheel.
Last edited by hemlock; 09-06-2002 at 07:39 PM.