5 comments

[ 2.3 ms ] story [ 23.5 ms ] thread
"load SQL commands from gzipped file into database mkfifo --mode=0666 /tmp/namedPipe gzip --stdout -d file.gz > /tmp/namedPipe LOAD DATA INFILE '/tmp/namedPipe' INTO TABLE tableName;"

When I do this I use something like: tar -xOzvf file.sql.tgz | mysql

Thanks for posting this list I always pick up something new with these kind of posts. :)

edit: I just noticed that yours is a totally different use case... and also very useful.

(comment deleted)
The advantage of the fifo is that you don't decompress the original file to the HDD, and because of this, it's faster and you save on disk space. You can also use mknod for this. Glad i could help :)