Being a sysadmin, you'll probably often need to find out what is running on a server. There are several ways to do this on Linux: # netstat -nlptu Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:…
Redirect root of domain to somewhere else: server { server_name zombix.org www.zombix.org; location = / { rewrite ^ http://about.me/z0mbix permanent; } } Redirect www.domain.com to domain.com: server { server_name www.z0mbix.io; return 301 $scheme://z0mbix.io$request_uri; } Redirect all HTTP requests to HTTPS: server { server_…
Now my company has around 35 different EC2 instances (and growing), I needed a way to easily SSH to them by their 'Name' tag instead of randomly assigned DNS name as we still have pets not cattle (tut tut!). This simple script does the job quite nicely: #!/usr/bin/env…
Some ways to see what is filling your disks: du --max-depth=5 -xha | sort -hr | head -n 30 Or install ncdu (http://dev.yorhel.nl/ncdu): ncdu -rx / ncdu 1.10 ~ Use the arrow keys to navigate, press ? for help [read-only] --- / ---------------------------------------------------------------------- 817.0MiB [##########] /usr 486.3MiB [##### ] /var 476.…