in

UbuntuUbuntu

Install mLocate & Locate Files on Ubuntu 19.10, 18.04 LTS Linux!

mLocate Command Line Utility Installation on Ubuntu Linux!

Install mLocate Command

L

ocate Command in Ubuntu Linux: mLocate app is a command line utility which allows you to search and find files on your Ubuntu system. You can simply install the utility using the APT package installer. In this article, we will explain how to install mLocate command line utility app on your Ubuntu systems.

Jump To:

Install mLocate Utility:

You can install the locate command line utility using the below command!

$sudo apt install mlocate
Install mLocate Command Utility
Install mLocate Command Utility
  • Copy the above command & execute it to initiate the installation process.

In a few seconds, the installation of mLocate utility will be completed.

Locate Command Options:

locate –h, the command will print all the available options in the terminal.

[email protected]:~$ locate --h
Usage: locate [OPTION]... [PATTERN]...
Search for entries in a mlocate database.

  -A, --all              only print entries that match all patterns
  -b, --basename         Match only the base name of pathnames
  -c, --count the only print number of found entries
  -d, --database DBPATH  use DBPATH instead of default database (which is
                         /var/lib/mlocate/mlocate.db)
  -e, --existing         only print entries for currently existing files
  -L, --follow           follow trailing symbolic links when checking file
                         existence (default)
  -h, --help             print this help
  -i, --ignore-case      ignore case distinctions when matching patterns
  -p, --ignore-spaces    ignore punctuation and spaces when matching patterns
  -t, --transliterate    ignore accents using iconv transliteration when
                         matching patterns
  -l, --limit, -n LIMIT  limit output (or counting) to LIMIT entries
  -m, --mmap             Ignored, for backward compatibility
  -P, --nofollow, -H     don't follow trailing symbolic links when checking file
                         existence
  -0, --null             separate entries with NUL on output
  -S, --statistics       don't search for entries, print statistics about each
                         used database
  -q, --quiet            report no error messages about reading databases
  -r, --regexp REGEXP    search for basic regexp REGEXP instead of patterns
      --regex            patterns are extended regexps
  -s, --stdio            ignored, for backward compatibility
  -V, --version          print version information
  -w, --wholename        match whole path name (default)

Report bugs to https://pagure.io/mlocate.
[email protected]:~$ 

These are the available options of the command Locate in Ubuntu Linux.

Check this too  Basic Linux Commands & Codes for Beginners[Ubuntu & Mint & More]

How to use:

Using locate command in Linux is very easy! The basic syntax to find or locate the files in your system is,

Locate Command Syntax!
$ locate Your_File_Name
or
$ locate Your_Folder_Name

If you want to locate the file using the filename and then use the following command,

$locate Example.txt

If you want to display all the file having the same name and then use the below command,

$locate -n 5 Example.txt
  • -5 : Number of files that want to show in the output.

Remove mLocate Command Utility:

You can remove the mLocate command by using a simple command,

$sudo snap remove mlocate
Remove mLocate Command Utility
Remove mLocate Command Utility

Follow the proceedings and the mLocate command utility app will be removed from your Ubuntu Linux system.

Verdict:

That’s it. This is the wrap section of this article. Locate and find command are almost similar but both have some unique changes in their functions. If you have any queries related to this article and then kindly comment us below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Written by Rachel

I'm Rachel, From Arizona. I am playing the "Content Management" Role in Tec Robust. I started working in TR from Jan 2019. Big Marvel Fan.

Contact me:
tecrobust [@] gmail.com
Sub: Message to Rachel

Contribute Us!

Kernel 5.6 Comes with USB 4.0

Linux Kernel 5.6 Now Supports USB 4.0 Version! Quick Brief!

Linux Mint 20 New Features

What’s New in Linux Mint 20 & Linux Mint DE 4 Debbie Version!