LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 09: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, 11:39 AM   #2
bsdunix
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:

http://www.linuxquestions.org/questi...7/#post3473663
 
Old 03-11-2011, 11: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: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
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, 11:59 AM   #4
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,261

Rep: Reputation: 297Reputation: 297Reputation: 297
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, 01: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 11:40 AM
startx command in FC7 reverts me back to the command prompt sriram87 Linux - Newbie 5 01-04-2008 12:18 AM
How to view the partitions of USB drives in Grub prompt? rajasekaran Linux - Software 1 06-13-2006 04:32 PM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM


All times are GMT -5. The time now is 03:29 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration