How to delete files older than certain number of days

One thing that comes very handy is usage of cron to make scheduled job to delete old files so that you can free up some space on your hard drive

# Delete Apache logs older than 60 days
find /var/log/apache2/ -mtime +60 -exec rm {} \;

With this simple script you will search through Apache logs in folder /var/log/apache2, select the ones with access time older than +60 (60 days) and execute delete with rm command.

 

 

Good USB 2 Ethernet adapter that works with android/linux usb dongles like gk802, mk802

For almost a year now I am proud owner of gk802 iMX.6 quad stick. Ever since I bought the device, I immediately installed linux and used it as 24/7 powered personal server.

Device itself is great with quad core chip and 1GB of RAM, but limited only to WiFi connectivity provided by RTL8152 chip which is not fast or stable enough to be used for my purposes. Continue reading “Good USB 2 Ethernet adapter that works with android/linux usb dongles like gk802, mk802”

IRSSI Autoconnect to IRC server network, join channel and identify to Nickserv

First start irssi and connect to the network you would like to autoconnect in the future, register your nickname with nickserv and then type in the following:

/server add -auto -network fn irc.freenode.net
/network add -nick user -autosendcmd "/msg nickserv IDENTIFY *******" fn
/channel add -auto #channel fn

Continue reading “IRSSI Autoconnect to IRC server network, join channel and identify to Nickserv”