This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "display_name,email address,last_used" > ~/Desktop/recent_email_addresses.csv ; sqlite3 -csv ~/Library/Containers/com.apple.corerecents.recentsd/Data/Library/Recents/Recents "SELECT DISTINCT c.display_name, c.address, strftime('%m-%d-%Y', datetime(r.last_date/1000, 'unixepoch')) as_string FROM contacts c INNER JOIN recents r ON c.recent_id = r.ROWID WHERE c.kind = 'email' AND r.last_date > 1483921673792 ORDER BY r.last_date DESC;" | sort -f -u -t , -k 2,2 >> ~/Desktop/recent_email_addresses.csv |