How to use Rsync to copy only specific subdirectories (same names in several directories)

I’ve found the reason. As for me – it wasn’t clear that Rsync works in this way. So correct command (for company1 directory only) must be: rsync -avzn –list-only –include ‘company1/’ –include ‘company1/unique_folder1/***’ –exclude ‘*’ -e ssh user@server.com:/path/to/old/data/ /path/to/new/data I.e. we need include each parent company directory. And of course we cannot write manually all … Read more

Upgrading PHP on CentOS 6.5 (Final)

As Jacob mentioned, the CentOS packages repo appears to only have PHP 5.3 available at the moment. But these commands seemed to work for me… rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm yum remove php-common # Need to remove this, otherwise it conflicts yum install php56w yum install php56w-mysql yum install php56w-common yum install php56w-pdo yum install php56w-opcache php … Read more

Run bash script as daemon

To run it as a full daemon from a shell, you’ll need to use setsid and redirect its output. You can redirect the output to a logfile, or to /dev/null to discard it. Assuming your script is called myscript.sh, use the following command: setsid myscript.sh >/dev/null 2>&1 < /dev/null & This will completely detach the … Read more

CentOS 64 bit bad ELF interpreter

You’re on a 64-bit system, and don’t have 32-bit library support installed. To install (baseline) support for 32-bit executables (if you don’t use sudo in your setup read note below) Most desktop Linux systems in the Fedora/Red Hat family: pkcon install glibc.i686 Possibly some desktop Debian/Ubuntu systems?: pkcon install ia32-libs Fedora or newer Red Hat, … Read more

tech