LuckyLuke
LuckyLuke

Reputation: 49077

Edit sqlite file from terminal Mac

I can not find any documents where I can open existing sqlite database file that I made from the terminal on Mac. I want to add some additional rows to the existing database. I probably search for the wrong things, so anything that points me in the right direction is much appriciated.

Upvotes: 2

Views: 18545

Answers (4)

pluckyglen
pluckyglen

Reputation: 819

I realize this is a bit tangential to the question, but it's helpful to be able to find/move hidden files in Finder, because often sqlite DBs will wind up in a hidden folder. See:

http://www.macworld.com/article/1051830/showallfinder.html

The key bit is to enter this in the Terminal, then force Finder to relaunch (via the Apple menu's Force Quit on Lion):

defaults write com.apple.Finder AppleShowAllFiles YES

Change that to NO at the end to toggle it off.

Upvotes: 0

Greg Glockner
Greg Glockner

Reputation: 5653

If you want to remain in the Terminal, you can open a sqlite3 database using the command sqlite3 [databasename]. From here, you can select rows or insert new ones using SQL commands. If you prefer a GUI, there are many to choose from, including the free Firefox plugin, sqlite-manager.

Upvotes: 12

Kex
Kex

Reputation: 776

Whenever you work with Mac built-in sqlite3 it saves the files in the current folder where your Terminal is and the way you can access them is the reversed story, open sqlite3 while you are at the folder where your database is.

Upvotes: 1

9000
9000

Reputation: 40894

Find and get precompiled binaries for OSX. Use the command line client.

Upvotes: 0

Related Questions