Clear Terminal Screen

by Kyle on

clear

Export MySQL Dump

by Kyle on

mysqldump -h DBHOST -u DBUSER -pDBPASS DBNAME > dump.sql

Replace text in uppercase with the appropriate information:

  • DBHOST - Database hostname, usually localhost
  • DBUSER - User with privileges to the database
  • DBPASS - Password for the user
  • DBNAME - Database name

Import MySQL Dump

by Kyle on

mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < dump.sql

Replace text in uppercase with the appropriate information:

  • DBHOST - Database hostname, usually localhost
  • DBUSER - User with privileges to the database
  • DBPASS - Password for the user
  • DBNAME - Database name

List Open Connections And Sort By IP Address

by Kyle on

netstat -atun | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -n

Send Email From Shell

by Rick on

mail -s "Subject" email@address.com < message.txt

Hide Sidebar