in reply to Check Directories for Files
If you know to expect the filesystem hierarchy you suggested- There's not even a need to play with the B?? dirs..for dir in $(find /rootdir/101/ -type d -name "B??"); do find $dir -type f -exec rm '{}' \; ; done; # or to move elsewhere # do find $dir -type f -exec mv '{}' /tmp/foundstuff/ \; ;
$ find /rootdir/101/ -type f -exec mv '{}' /tmp/foundstuff/ \;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Check Directories for Files
by drodinthe559 (Monk) on Nov 24, 2009 at 20:55 UTC |