The first thing you need to know is the path to the database, CoreData created is usually placed in the sandbox Documents folder, and you built it to see yourself,
Sqlite3 #数据库路径 #//Enter the database
. Tables//View tables in the database
. Schema//Enter a specific table to display the table structure
SELECT * FROM #表名 #
Go//Display table information
(View CoreData created by SQLite):
Other commands about the terminal:
Directory Operations
Command name function Description Use example
mkdir Create a directory mkdir dirname
RmDir Delete a directory rmdir dirname
Mvdir move or rename a directory Mvdir Dir1 Dir2
CD Change current directory CD DirName
PWD Displays the path name of the current directory pwd
LS Displays the contents of the current directory Ls-la
File operations
Command name function Description Use example
Cat display or connection file cat filename
OD Displays the contents of non-text files od-c filename
CP Copy files or directories CP file1 file2
RM Delete file or directory RM filename
MV Change the file name or the directory in which MV File1 file2
Find finds files using matching expressions. -name "*.C"-print
File display files of type filename
Select action
Command name function Description Use example
Head displays the first few lines of the file head-20 filename
Tail display the last few lines of a file tail-15 filename
Cut displays some fields in each line of the file cut-f1,7-d:/etc/passwd
COLRM remove several columns from standard input COLRM 8 file2
Diff compares and displays the difference of two files diff file1 File2
Sort or merge files sort-d-f-u file1
Uniq remove duplicate lines from the file Uniq file1 file2
Comm displays both public and non-public rows of two ordered files comm file1 file2
Number of characters, number of words, and number of lines in WC statistics file WC filename
NL adds line number to file NL file1 >file2
Process actions
Command name function Description Use example
PS Display process Current state PS U
Kill terminates the process kill-9 30142
Time operation
Command name function Description Use example
Date Displays the current date and time of the system.
Cal Display Calendar cal 8 1996
Time of execution of the statistics program a.out
Network and communication operations
Command name function Description Use example
Telnet telnet hpc.sp.net.edu.cn
Rlogin telnet rlogin hostname-l username
RSH executes the specified command on the remote host rsh f01n03 date
FTP transfers files between the local host and the remote host ftpftp.sp.net.edu.cn
rcp copying files between the local host and the remote host RCP file1 host1:file2
Ping sends a response request to a network host ping hpc.sp.net.edu.cn
Mail Read and send email
Write sends a message to another user write username pts/1
MESG allow or deny receive messages MESG N
Korn shell command
Command name function Description Use example
History lists several recently executed commands and numbering history
R repeatedly executes a command that has recently been executed r-2
Alias defines aliases for a command del=rm-i
Unalias to cancel the definition of an alias Unalias del
Other commands
Command name function Description Use example
Uname displays information about the operating system uname-a
Clear clears the screen or window contents clear
ENV displays all currently set environment variables env
Who lists all users currently logged on who
WHOAMI Displays the user name that is currently being manipulated WhoAmI
TTY displays the name of the terminal or pseudo-terminal TTY
Stty display or reset the control key definition Stty-a
Du query disk usage du-k subdir
DF/TMP Displays the total and free space of the file system
W Displays the total information for the current system activity
See: http://blog.sina.com.cn/s/blog_71715bf801016di7.html
Use the terminal to query the database SQLite (created by yourself, or created with CoreData).