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