urbansky
11/25/2016 - 11:24 AM

Misc linux commands

Misc linux commands

# All open port with bounded program

netstat -lntu

# Extract
tar -xzf archiv.tar.gz -C /PFAD/ZUM/ORDNER 

# Create
tar -czf archiv.tar.gz

# Mysql - Dump Database
mysqldump --opt -p -u root databaseName > out.sql

# Mysql - Import one Database from dump
mysql -u root -p --database=databaseName < out.sql

# SSH-Tunnel for remote MySQL-Database
ssh user@host -L 3333:localhost:3306 -N