How to Find Locate Search for Files with Linux

November 24, 2020

Table of Contents

Basic Linux commands for your server or servers.


Many servers admins or hobbyists will usually at some point have an issue trying to find files on the Linux server.

This quick guide will learn you how to use the find command. This will help you search for files on your VPS or Dedicated Server using many options like filters and file types and even size. Also included is how to use the locate command which is obviously used to locate files/folders on a Linux Machine.

Finding Files/Folders using Name

Quite an easy way to find what you need using the command:

 find -name whateverhere

To find any file by name, input:

find -name filenamehere

Finding or Searching by Type

You can specify the type of files you want to find with the -type parameter. It works like this:

  • find -type type_descriptor query

Different ways to find file types using find / -type f for example:

f: regular file

d: directory

l: symbolic link

c: character devices

b: block devices

For example, if you want to find character devices, input this command:

  find / -type c

You can search all files that end in .conf using tis command:

  • find / -type f -name “*.conf”

Find files larger than whatever size you want for example using this command:

find / -size +50M

You can of course change to something like this command:

find / -size +5000M

Try mlocate you can install the command below with Debian/Ubuntu

apt install mlocate

On CentOS, use dnf instead:

dnf install mlocate

mlocate database auto-updates using a daily cron you can update before searching for something with the following command:


Use the updateb command before you search using mlocate to ensure you are searching all files including new files.

To find files with locate, simply use this following example command:

locate whateveryouwanthere

Another example:

locate *.gz

If you want to see the history of data information locate has indexed use the following command:

locate -S

Share on
More posts

Dedicated Servers Quick Guide

What is a Dedicated Servers? Why bother using a dedicated server over a VPS or Shared Hosting?A dedicated server is a server 100% dedicated to your website/project or business needs.

Windows Programmes with Linux

How do I run a Windows program on Linux? You probably ran into issues with running a windows application in Linux and now you have ended up here, what you

vMA 5.1 Patch 1 Released

Expendable news item here too good not to be posted.  For those who may have missed it, VMware has released an update to the vSphere Management Assistant (vMA) 5.1 appliances

Get 90% Discount

First 3 People gets the Bonus!
Don't Miss Out Our Big Sale

Get 0-90% On All
247Rack Services


The Sale Is Until The End Of March