Clearing out a bunch of spam with spoofed emails that were bounced back to some poor guy with a catchall email
We don't really want to delete them all just in case.
The "find" produces
The awk
And then the mv, moves it.
cd /usr/local/scratch/ mkdir junk find /var/spool/postfix -exec grep "somediscernible-feature.com" '{}' \; | awk '{print($3)}' | xargs -J X mv X ./junk/
The "find" produces
Binary file /var/spool/postfix/active/D/D8832E38 matches Binary file /var/spool/postfix/active/D/D78EC1C72 matches Binary file /var/spool/postfix/active/D/D593D279D matches Binary file /var/spool/postfix/active/D/D0EB32833 matches
The awk
/var/spool/postfix/active/D/D8832E38 /var/spool/postfix/active/D/D78EC1C72 /var/spool/postfix/active/D/D593D279D /var/spool/postfix/active/D/D0EB32833
And then the mv, moves it.