I currently have a large 15 GB database .db file in my linux EC2 server. I know that SQLite 3 can directly export to a .csv file using this command:
sqlite3 -header -csv ./home/data.db "select * from datafile;" >> out.csv
However, I was wondering if there was an option for exporting a .db file into a tab-delimited text file instead. I looked up and down the documentation for SQLite 3 but only found references to .csv files. Would anyone know anything on how I could do this? Thanks so much!
Sure:
sqlite3 -header -separator " " ./home/data.db "select * from datafile;" > out.txt
should do it. The contents of " "
is the tab character. You can type if from the command line (in bash
) by preceeding it with a Ctrl-v
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With