Commands tagged gmail (11)

  • This takes a picture (with the web cam) every 5 minutes, and send the picture to your e-mail. Some systems support mail -a "References: " so that all video surveillance emails are grouped in a single email thread. To keep your inbox clean, it is still possible to filter and move to trash video surveillance emails (and restore these emails only if you really get robbed!) For instance with Gmail, emails sent to can be filtered with "Matches:" Show Sample Output

    while true ; do fswebcam -d /dev/video0 -r 1280x1024 -F 15 - | uuencode $(date +\%Y\%m\%d\%H\%M).jpeg | mail -s "Video surveillance" ; sleep 300 ; done
    pascalv · 2016-08-09 14:22:45 0

  • -1
    slu4aen · 2014-10-08 06:55:32 0
  • If you are a regular user of Google Chrome and Gmail Offline, you'll find that Gmail Offline stops working after a while due to corruption of its local storage in your browser. Worse, trying to use Google Chrome's "Clear Browsing Data" menu command to remove all the local storage is (1) overkill, because it deletes non-Google page local storage, and (2) ineffective, because once the storage is corrupt, Google Chrome doesn't know how to delete it either. Fortunately, it's all stored in obviously named files in your home directory; this command deletes the files directly, after which restarting Google Chrome will let you reinstall Gmail Offline correctly.

    /bin/rm -f ~/Library/Application\ Support/Google/Chrome/Default/Local\ Storage/*google*
    poslfit · 2013-06-14 19:39:12 0

  • 0
    curl -su username:passwd | xmlstarlet sel -N x="" -t -m //x:entry -v 'concat(position(), ":", x:title)' -n
    kev · 2012-05-05 14:34:55 0
  • Just an alternative with more advanced formating for readability purpose. It now uses colors (too much for me but it's a kind of proof-of-concept), and adjust columns. Show Sample Output

    curl -u username --silent "" | awk 'BEGIN{FS="\n";RS="(</entry>\n)?<entry>"}NR!=1{print "\033[1;31m"$9"\033[0;32m ("$10")\033[0m:\t\033[1;33m"$2"\033[0m"}' | sed -e 's,<[^>]*>,,g' | column -t -s $'\t'
    frntn · 2011-10-15 23:15:52 0
  • Checks your gmail account every 30 seconds and display the number of new messages in the top right corner of the terminal. A kind of CLI "Gmail notifier" if you will. :-) This is a mashup of and

    while sleep 30; do tput sc;tput cup 0 $(($(tput cols)-15));echo -n " New Emails: $(curl -u username:password --silent | grep 'fullcount' | grep -o '[0-9]\+')";tput rc; done &
    saze · 2011-09-07 08:40:28 0
  • Copies an entire hierarchy of mailboxes from the named POP3/IMAP/etc. source to the named destination. Mailboxes are created on the destination as needed. NOTE: The 'mailutil' is Washington's University 'mailutil' (apt-get install uw-mailutils). More examples mailutil transfer {}INBOX Gmail/ ; mailutil check}\[Gmail\]/Spam If you use the utility in the first, append -v|-d flag(s) to the end the commands above (man mailutil).

    mailutil transfer {} Gmail/
    bogomips · 2010-10-07 07:30:00 0
  • Required curl version >=7.21; using ~/.netrc for authorization

    curl -n --ssl-reqd --mail-from "<>" --mail-rcpt "<user@server.tld>" --url smtps:// -T file.txt
    mitry · 2010-10-03 15:44:53 16
  • I use this command in my Conky script to display the number of messages in my Gmail inbox and to list the from: and subject: fields. Show Sample Output

    wget -O - '' --no-check-certificate
    PLA · 2010-09-26 14:47:13 3
  • This is a basis for other Google API commands.

    curl -s -d Email=$email -d Passwd=$password -d service=lh2 | grep Auth | sed 's/Auth=\(.*\)/\1/'
    matthewbauer · 2010-02-04 03:34:54 2
  • Checks the Gmail ATOM feed for your account, parses it and outputs a list of unread messages. For some reason sed gets stuck on OS X, so here's a Perl version for the Mac: curl -u username:password --silent "" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | perl -pe 's/^<title>(.*)<\/title>.*<name>(.*)<\/name>.*$/$2 - $1/' If you want to see the name of the last person, who added a message to the conversation, change the greediness of the operators like this: curl -u username:password --silent "" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | perl -pe 's/^<title>(.*)<\/title>.*?<name>(.*?)<\/name>.*$/$2 - $1/' Show Sample Output

    curl -u username:password --silent "" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 - \1/p"
    postrational · 2009-09-07 21:56:40 6

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: