Skip to content

Instantly share code, notes, and snippets.

@aminamid
Last active August 29, 2015 14:20
Show Gist options
  • Save aminamid/12b6a970a3381f1b7c6c to your computer and use it in GitHub Desktop.
Save aminamid/12b6a970a3381f1b7c6c to your computer and use it in GitHub Desktop.
Mx operation 1liner
D=${INTERMAIL}/log; diff <(find ${D}/. -type l -exec readlink {} \; | sort | uniq -u) <(find ${D}/. -type f -exec basename {} \; | sort | uniq -u) | sed -n -E 's#^> (.*)$#'${D}'/\1#p' | xargs rm
5,15,25,35,45,55 * * * * bash -l -c "~/mxlogdel.sh 2>&1 | logger -t mxlogdel -p local0.info "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment