How to count files in GNU/Linux

Sometimes, counting files in a folder or directory in GNU/Linux is essential for several reasons. That’s why GNU/Linux provides a couple of different commands with their own parameters to meet our exact needs. Let’s take a look at them.

  • LS
  • FIND

To count files in GNU/Linux (excluding hidden files), we will use the WC command with the -L parameter (all lowercase):

Read more

Installing and using the locate command in GNU/Linux

In GNU/Linux env, the locate command is a very good tool for locating folders/directories and files. It uses an updated system database, unlike the find command, which searches without indexes, making the locate command much faster and more efficient, especially if we have a system with few resources and/or high demand. The only drawback of the locate command is if its database does not exist, is outdated, or is corrupted.

Read more

How to fix the error Too Many Connections

MySQL-MariaDB-logos

When you have a web application (site, blog, forum, etc.) that has high demand, meaning a large number of users visit it, this translates into increased server consumption. If the web app uses a MySQL – MariaDB database and the queries are extremely high (due to poor web programming or a large number of users using the site), there’s a chance that MySQL – MariaDB will display this error:

Read more