Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-11-2011, 08:42 AM   #1
LQ Newbie
Registered: Jul 2008
Distribution: RedHat Enterprise
Posts: 12

Rep: Reputation: 0
Question view cookies from command prompt?

I was curious if I would be able to view cookies from a command prompt when ssh'd into a machine. On a test machine running fedora 13, I found that the cookies were stored in a cookies.sqlite. I made sure that all instances of Firefox was closed and attempted to view the file running the following command

sqlite3 cookies.sqlite

It loaded but I was unable to run view any of the information because the database was locked? There were no instances of Firefox running and I check to make sure there were no services of Firefox running as well. Am I doing something wrong? Is this not the correct way to view cookies from the command line ? I have tried google searches and has since been unable to come up with anything. If any of you could help me out I would greatly appreciate it.

Old 03-11-2011, 10:39 AM   #2
Senior Member
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 80
I was able to view the file from the console and using SSH. I followed the instructions from this post:
Old 03-11-2011, 10:43 AM   #3
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
Try making a copy of the sqlite file and reading from it instead. That worked for me once when I was trying to write a script that needed to fetch a cookie, without worrying if FF was running or not.
Old 03-11-2011, 10:59 AM   #4
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,293

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
FILENAME=$(find ~/.mozilla -type f -name cookies.sqlite)
sqlite3 $TEMPNAME "select * from moz_cookies"
Old 03-11-2011, 12:39 PM   #5
LQ Newbie
Registered: Jul 2008
Distribution: RedHat Enterprise
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks everyone for the quick reply. It worked as you all stated, copied the file to another directory and was able to view it. Thanks again!!!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
view pdf file through command prompt sumer Linux - Newbie 2 03-31-2009 10:40 AM
startx command in FC7 reverts me back to the command prompt sriram87 Linux - Newbie 5 01-03-2008 11:18 PM
How to view the partitions of USB drives in Grub prompt? rajasekaran Linux - Software 1 06-13-2006 03:32 PM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration