Last edit: 19 Aug 2018

General

#Display OS
$ uname -a

#Delete GZip files older than 14 days
$ find *.gz -mtime +14 -exec rm {} \;

#mySQL dump
$ mysqldump --opt -uUSERNAME -pPASSWORD -h HOSTNAME DATABASE_NAME FILENAME.sql

Nginx

/etc/nginx/sites-available

#start nginx
service nginx start

#stop nginx
service nginx stop

#restart nginx
service nginx restart

#reload nginx
service nginx reload

#check nginx config
nginx -t

#check nginx status
service nginx status

MySQL

#start
sudo /etc/init.d/mysql start

#stop
sudo /etc/init.d/mysql stop

#restart
sudo /etc/init.d/mysql restart