Linux Tutorial | Matt Cooper - Open Source Support
Linux Tutorial | Matt Cooper - Open Source Support
Uncategorized

Display the last shutdown – Linux

last -x | grep shutdown | less

December 9, 2019by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Command line Tutorial

Display the last reboot – Linux

last reboot | less
December 9, 2019by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Command line Tutorial

Find the reason for shutdown or reboot – Linux

last -x | head | tac

Examples of output:

runlevel (to lvl 0)   ... <-- first the system shuts down (init level 0)
reboot   system boot  ... <-- afterwards the system boots
runlevel (to lvl 2)   2.6.24-... Sat Sep 10 11:07 - 11:01 (2+23:34)
runlevel (to lvl 3)   ... <-- the system was running since this momemnt
reboot   system boot  ... <-- then we've a boot WITHOUT a prior shutdown
runlevel (to lvl 3)   3.10.0-693.21.1. Sun Jun 17 15:40 - 09:51  (18:11) 
December 9, 2019by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Amazon Linux

Find largest directories Linux

du -a /directory | sort -n -r | head -n 5

*Replace directory with e.g. / to search the entire disk. Or /root for root only etc.

November 15, 2019by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
PHP

Nginx php-fpm Increase Max Upload file size

Update the following values in /etc/php.ini:

upload_max_filesize = 20M
post_max_size = 20M

Restart php-fpm

service php-fpm restart

Add the following to the nginx http block:

client_max_body_size 20m;

Restart nginx

service nginx restart
August 28, 2019by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Page 3 of 35«12345»102030...Last »

About me

Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@linuxtutorial.co.uk

Recent Comments

  • Andrew on Export list of Amazon EC2 Instances to CSV
  • Matt Cooper on Proxmox – add a second hard drive to node for Backups
  • karis on Proxmox – add a second hard drive to node for Backups
  • Matt Cooper on Remote MySQL Database – Slow Connection
  • Matt Cooper on Bash script to send public IP address to Email

Categories

  • AdvancedTomato
  • Amazon AWS
  • Amazon Linux
  • Amazon S3
  • Apache
  • Apache Kafka
  • Backup Tutorial
  • Bash Scripting
  • Centos Tutorial
  • CloudFlare
  • Command line Tutorial
  • CPanel Troubleshooting
  • CPanel Tutorial
  • Debian Troubleshooting
  • Debian Tutorial
  • DKIM
  • Docker
  • EC2
  • ESXi
  • Faildows
  • Google Adwords
  • Google Analytics
  • Google Chromebook
  • Google Mail
  • graylog
  • IAM
  • imapsync
  • iRedmail Tutorial
  • ISPConfig3 Tutorial
  • Java
  • ldap
  • letsencrypt
  • MyDNS
  • MySQL Troubleshooting
  • MySQL Tutorial
  • Nest Install
  • Netbeans
  • Nginx
  • Nginx Troubleshooting
  • openssl
  • PCI Compliance
  • Percona
  • PHP
  • Plex Media Server Tutorial
  • Postfix
  • Proxmox Tutorial
  • Pure FTPd
  • Resourcespace Tutorial
  • Route 53
  • Rsync Tutorial
  • Security
  • Smoothwall Troubleshooting
  • Smoothwall Tutorial
  • SSH
  • tcpdump
  • Thunderbird
  • Tomcat Troubleshooting
  • Ubuntu Tutorial
  • Uncategorized
  • Unison
  • vmware
  • vzdump
  • WHM
  • Wireshark
  • Wordpress Troubleshooting
  • WordPress Tutorial

“See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." Linus Torvalds

© 2017 copyright www.linuxtutorial.co.uk // All rights reserved