Advertisement
oquidave

find files older than certain date

Mar 22nd, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.34 KB | None | 0 0
  1.  #find emails older than 6 months and move them to another dir
  2.         f=`find $dpath/$email/Maildir/cur -mtime +180`
  3.         if [ $? -eq 0 ]; then
  4.                 emaildes=$ddest/$email/Maildir/cur
  5.                 mkdir -p ${emaildes}
  6.                 mv -v $f $emaildes
  7.         else
  8.                 echo "no files found"; continue
  9.         fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement