在Shell脚本中从places.sqlite中的moz_places检索数据 [英] Retrieving data from moz_places in places.sqlite in a shell script

查看:93
本文介绍了在Shell脚本中从places.sqlite中的moz_places检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu,我的firefox版本是19.02.我正在使用sqlite3版本3.7.9.我想构建一个shell脚本,其中涉及从places.sqlite文件中的moz_places表中检索URL

I am using Ubuntu, my firefox version is 19.02.I am using sqlite3 version 3.7.9.I want to build a shell script that kind of involves retrieval of url from moz_places table in places.sqlite file

places.sqlite文件的位置->/home/akshayaj/.mozilla/firefox/x3epy44.default/places.sqlite

location of places.sqlite file-->/home/akshayaj/.mozilla/firefox/x3epy44.default/places.sqlite

我的shell脚本的位置--->/home/akshayaj/Shell Scripts/firefoxx.sh

location of my shell script--->/home/akshayaj/Shell Scripts/firefoxx.sh

到目前为止,我的脚本是:-

My script so far:-

sqlite3 .mozilla/firefox/x3epy44.default/places.sqlite从moz_places中选择网址"

sqlite3 .mozilla/firefox/x3epy44.default/places.sqlite "SELECT url FROM moz_places"

出现错误: 错误:无法打开数据库文件

It is giving an error: Error:unable to open database file

请告诉我我哪里错了

推荐答案

Firefox在运行时锁定 places.sqlite 数据库.
阅读此以了解此功能.

Firefox locks the places.sqlite database while it's running.
Read this to know this feature.

关闭Firefox或将places.sqlite文件复制到另一个位置,然后尝试创建连接.

Either close the firefox or copy the places.sqlite file to another location and then try to create a connection.

这篇关于在Shell脚本中从places.sqlite中的moz_places检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆