Importing zipped files in Mysql using command line
Try: unzip -p dbdump.sql.zip | mysql -u root -p yourdbname The dbdump.sql.zip should contain a single SQL file. The -p flag pipes the output into the mysql binary.
Try: unzip -p dbdump.sql.zip | mysql -u root -p yourdbname The dbdump.sql.zip should contain a single SQL file. The -p flag pipes the output into the mysql binary.
Multiprocessor (multithreading) compression support was added to xz in version 5.2, in December 2014. To enable the functionality, add the -T option, along with either the number of worker threads to spawn, or -T0 to spawn as many CPU’s as the OS reports: xz -T0 big.tar xz -T4 bigish.tar The default single threaded operation is … Read more
“Lowest Common Denominator”. The extra space saved is rarely worth the loss of interoperability. Most embedded Linux systems have gzip, but not xz. Many old system as well. Gnu Tar which is the industry standard supports flags -z to process through gzip, and -j to process through bzip2, but some old systems don’t support the … Read more
Use the -J compression option for xz. And remember to man tar 🙂 tar cfJ <archive.tar.xz> <files> Edit 2015-08-10: If you’re passing the arguments to tar with dashes (ex: tar -cf as opposed to tar cf), then the -f option must come last, since it specifies the filename (thanks to @A-B-B for pointing that out!). … Read more