Moving files Older than 7 days. | linux centos moving old files 7 days find /var/log/source/ -mtime 7 -exec mv “{}” /tmp/destination \;

A incident came through to me this morning stating /var is getting full (95%).

I wanted a command which will quick go through the contents of the directory and move anything older than 7 days to /tmp.

Moving the files will get me out of trouble fast and allow me to compress the data in the temp location.

See command below.


IPTABLES blocking traffic outbound to a specific IP | iptables block ip hosts outbound

I was in a situation today where an application was talking to hosts it shouldn’t have. A quick way to stop this from happening was with iptables. Make sure you ping the host first before the rule and after to ensure it has taken affect.

The rule to block a specific IP is

To check the rule is in,

To remove the rule, the ‘1’ means the first line in the table, in this case this was the only outbound rule.



Raspberry Pi – Experiment 3 | Raspberryi pi battery charging uptime experiment

This is the third experiment Im running to build a raspberry pi raspberry_pi_logo-svgsystem which will have the ability to run 24/7.

These first set of experiments are designed so that we can gain an understanding about how batteries can power the raspberry pi and for how long.

I bought a 20AH battery from ebay for around $65AUD, I was not wp-1476456214624.jpgpositive about the outcome because for the previous two experiments.

Boy was I wrong!

After connecting all the components I found myself checking its uptime every few hours, just waiting for it to die off!

Turns out this baby did the trick, it ended up giving the raspberry Pi a total of 4 days uptime. Thats 96 hours, I’m really impressed.

Given the uptime this will give us more than enough power for it to be connected to solar, which will be the next experiment.


Ill be connect the solar panel and charge controller, and trying to waterproof them as best as I can. Ill post photos when its completed.

Raspberry Pi – Experiment 2 | raspberry pi wifi batteries AA experiment duration

Raspberry Pi Power Experiment 2raspberry_pi_logo-svg

Raspberry Pi

Going on from my first experiment, this one will be slightly different.

I will be using a 12v to 5v USB converter and a 12v AA battery caddy. This caddy stores 8 x AA 1.5v rechargeable batteries. This design will closely simulate my end design which will include a charge controller and a 60w Solar panel.


I did not commit to this design by soldering the wiring and connecting permanently as its a quick dry run test. I simply want to test the duration in which it will power a raspberry pi with a wifi dongle.


Unfortunetly the results sucked! Taking into account that the batteries are not new, the raspberry pi ran for 4 hours and 37 minutes.


This is a poor a result and is sending me back to the drawing board in regards to my design. I need to think about getting a sealed lead acid battery with some decent capacity.


Experiment 1