SQL for Firefox download history

I work for a database company so I tend to like to use SQL wherever possible.
Here's a case in point. Firefox download history window on WIndows7.

I have Cygwin SQLite installed. So, in bash.exe, I can ...

$ sqlite3 $(cygpath $APPDATA)/Mozilla/Firefox/Profiles/*.default/downloads.sqlite \
> "select datetime(endTime/1000000,'unixepoch','localtime'),source,target from moz_downloads where source not like '%oracle.com%'" \
> | head -2
2012-05-04 05:41:03|http://aihdownload.adobe.com/bin/install_flashplayer11x64_mssd_aih.exe|file:///C:/Users/Administrator/Downloads/install_flashplayer11x64_mssd_aih.exe
2012-08-09 12:26:51|http://cygwin.com/setup.exe|file:///C:/tmp/setup.exe

In real life, I don't use WHERE clause. I use 'grep' instead.
This command needs tweaking on old Windows like XP or 2003.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today