Deleting files older then N days


If you have a lot of files and you want to delete a couple of them older then N days.
You can use next command

this will find files in map /somewhere files older then 10 days.

Posted in CentOS, Linux Post, OS's, Scripting | Leave a comment

Shell script to copy data from lftp and dump/restore mysql

If you need to copy any data from remote ftp backup space using lftp you can use next script



Posted in Linux Post | Leave a comment

How to change permissions on files and directories on Linux

Use next commands

This will change permissions in all folder and sub folderts to 755

This will change file permissions to 644

Posted in Linux Post, Scripting | Leave a comment

Shell script to reset ebtables on Linux

Ebtables is an application program used to set up and maintain the tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is analogous to the iptables application, but less complicated, due to the fact that the Ethernet protocol is much simpler than the IP protocol. ebtables used with bridges on Linux. The following script will stop and clean all ebtables rules:

Posted in Debian, Firewall, Scripting, Ubuntu | Leave a comment

Add new rbl to exim on cPanel server

Exim config. manager in  cPanel, allow us to work only with two rbl list, и If you want to add additional RBL list such as, or, you need to do next

1) Move to directory /usr/local/cpanel/etc/exim/acls/ACL_RBL_BLOCK

2) Make a backup of of the next file

3) Open with nano this file spamhaus_spamcop_cannibal_rbl

4) Change adress in rows that contain “dnslists”. In this example new adress is

5) Generate new Exim config

Now new RBL list is added to EXIM. Following this example you can add such RBL list as you want. But please keep in mind that huge amount of list can slow down your server and increase fals/positive alerts

Posted in Hosting, Linux Post | Leave a comment