How i can recursively unzip files in archive and then import to mysql?

217 Views Asked by At

I have a lot of *.sql.gz files in directory (400+). How i can unzip all of them and then import to Mysql? I tried

gunzip -r < /share/new_moyo_ua | mysql -u root -proot new_moyo_ua

But this not work fine (gzip: stdin: Is a directory).

1

There are 1 best solutions below

0
On
gunzip *.sql.gz
cat *.sql | mysql ...