locate

Linux · System · available in the simulator

What it does

Find files by name using an indexed database, much faster than find.

Syntax

locate [opciones] patrón

Options and parameters

  • -i

    Ignore case distinctions.

  • -n

    Limit the number of displayed results.

    locate -n 10 passwd
  • -c

    Print only the number of matching entries.

  • -r

    Interpret pattern as a regular expression.

Usage examples

  • locate -n 10 passwd

Notes and common mistakes

  • Queries a database updated by updatedb, so results may be outdated.
Practise locate

Related commands