I can't think of a way to import all the files under the db directory into mysql at once, so please let me know.
For my part, I was wondering if I could get the file name list with ls-1db
and do well, but I couldn't think of a good way.
db
├-- 1.sql
├-- 2.sql
├-- 3.sql
└-- 4.sql
We are looking for ideas and opinions like, "Shouldn't we do this?"
As a questioner, I will respond as soon as possible, so please reply!
If the SQLite database file is data.db
, and you use xargs
.
$finddb-maxdepth1-type f-name'*.sql'|xargs-I@sh-c'sqlite3data.db<@'
© 2024 OneMinuteCode. All rights reserved.