[X-Unix] need help creating a find/move script

don poolmouse_nyc at mac.com
Mon Oct 16 23:57:16 PDT 2006


i was wondering if the unix gurus on this list could help me out with 
a script i'm trying to create. the script will be used as a "pre" 
script for bru so only full backup stage files (which are over 150g 
in size) are upstaged (moved to tape) while incremental stage files 
are moved to a folder where bru will not try to put them on tape.

1. search /Users/Shared/Staging directory for files that are under 
100g in size and over 24hrs old
2. move the files to /Users/Shared/Incrementals

i thought the script should look something like this:

find /Users/Shared/Staging/. -type f -atime +1 -size -100000000k 
-exec mv {} /Users/Shared/Incrementals/. \;

...how does this look? thanks for sharing your knowledge. :)

don
-- 

don montalvo, nyc
curmudgeon at large


More information about the X-Unix mailing list