zcat

Updated: 07 August 2026

zcat is identical to gunzip -c

zcat uncompresses either a list of files on the command line or its standard input and writes the uncompressed data on standard output.


Look at the contents of wp2shell-access.log.gz without un-compressing it

zcat wp2shell-access.log.gz

MySQL client

Updated: 26 January 2025

Install mysql client tools only (Ubuntu)

sudo apt-get install mysql-client

Run script on database, redirect output to log

mysql -u root -p db_name < sql_statement_file.sql >> query.log 2>&1

Run script on database, display results in a table

mysql --table -u the_user -pthe_user_pass -P 3307 -h 127.0.0.1 db_name < the-query.sql

Check if remote mysqld requires secure connections

mysql --ssl-mode=DISABLED -h example.com -u root -p

Execute a statement directly

mysql -u root -p db_name -e "SELECT * FROM tbl_foo LIMIT 5"

Run statements from inside a zipped SQL file

zcat /path/to/dump.sql.gz | mysql -u root -p the_database