Say that you have multiple log files for Nginx, Apache or any other software that you would like to tail. You can do this easily with
tail like so:
tail -f /var/log/nginx/*.log
tail -f /var/log/apache2/*.log
You need to have a fairly recent version of
tail to use this. It works on Ubuntu 16.04 with
tail version 8.25.
EasyEngine provides you with 1GB of swap space by default, but sometimes you’d like a little bit more. Here is how you can increase the swap space:
/etc/dphys-swapfile and set the following:
That’s it! Verify your new swap space with
sudo find /var/log/ -type f -regex '.*\.[0-9]+\.gz$' -delete
This will delete old, archived log files with the
You might also consider configuring logrotate to do this for you.
Simple way to clean up your repository if you have a lot of checked our branches.
git branch | grep -v "master" | xargs git branch -D
ls on a folder with many files or folders in it (>20 000) can take minutes or even hours. To speed up the process you can combine the unsorted output of
ls (which is fast) with the
sort command, like this:
ls -U | sort
systemctl set-default multi-user.target
systemctl set-default graphical.target
du ./ -h --max-depth=1 | sort -h
sudo apt-get install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades
Answer “Yes” in the dialogue that appears and you’re done!
Add this to the file
deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all
sudo apt-key add dotdeb.gpg
sudo apt-get update
Time to install PHP!
sudo apt-get install php-7.0
Installing support for certain packages is easy, just replace
Note: These instuctions do not work on ARM-based devices, such as the Raspberry Pi.
Run this in the folder where you want the files dumped:
for I in $(mysql -uroot -p -e 'show databases' -s --skip-column-names); do mysqldump $I > "$I.sql"; done