How to find all hard links in a directory on Linux

Posted on in Categories , , , , , , , , , last updated February 25, 2017

I have a file named /etc/passwd i and I would like to find all hard links to this file in a directory. How do I find out all other hard links to the /etc/passwd in /backups/ directory? How can find all hard links to a given file using Linux or Unix command line option?

How to set rsync speed limit from eating all bandwidth with –bwlimit option

Posted on in Categories , , , , , , , , last updated February 25, 2017

The rsync command is eating all my bandwidth from a backup script and generating tons of I/O. How do I set a limit for file transfer speed of rsync command on Linux or Unix-like system? How can I keep my rsync script from using all of my bandwidth?

How to create a new config file in Ansible playbook

Posted on in Categories , , , , , , , last updated February 19, 2017

I wanted to create a file named /etc/apt/apt.conf.d/1000-force-ipv4-transport with the value set to ‘Acquire::ForceIPv4 true;’ on 20 cloud servers hosted in AWS. I already setup Ansible playbook to automate stuff. How do I create a new file using Ansible playbook? Is it possible to create a complex file with many lines of text (say squid.conf) using Ansible IT automation tool?

PHP Fatal error: Call to undefined function gzinflate()

Posted on in Categories , , , , , , last updated February 5, 2017

I have a php script and whenever I run it, I get the following error message in my log file:
     2017/02/05 23:25:46 [error] 9696#9696: *10 FastCGI sent in stderr: “PHP message: PHP Fatal error: Call to undefined function gzinflate() in /home/xxxx/http/includes/functions.php(1) : eval()’d code on line 1″ while reading response header from upstream, client: 10.218.105.1, server: newsletter.cyberciti.biz, request: “GET /a/ HTTP/1.0”, upstream: “fastcgi://127.0.0.1:9000”, host: “server1.cyberciti.biz”
How do I fix this problem on Linux or Unix operating systems?