LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-11-2011, 08:42 AM   #1
s3ns4i
LQ Newbie
 
Registered: Jul 2008
Location: 127.0.0.1
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.

Thanks
 
Old 03-11-2011, 10:39 AM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
I was able to view the file from the console and using SSH. I followed the instructions from this post:

http://www.linuxquestions.org/questi...7/#post3473663
 
Old 03-11-2011, 10:43 AM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Code:
FILENAME=$(find ~/.mozilla -type f -name cookies.sqlite)
TEMPNAME="/tmp/cookies.sqlite"
cp $FILENAME $TEMPNAME
sqlite3 $TEMPNAME "select * from moz_cookies"
 
Old 03-11-2011, 12:39 PM   #5
s3ns4i
LQ Newbie
 
Registered: Jul 2008
Location: 127.0.0.1
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!!!
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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