Skip to content

Instantly share code, notes, and snippets.

@urbansky
Last active May 8, 2020 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urbansky/902aac43abe5a676e958120dd6a95ef8 to your computer and use it in GitHub Desktop.
Save urbansky/902aac43abe5a676e958120dd6a95ef8 to your computer and use it in GitHub Desktop.
Misc linux commands
# All open port with bounded program
netstat -tulpn | grep LISTEN
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment