Home > Bash, Linux > Linux ‘locate’ command

Linux ‘locate’ command

The command ‘locate’ is pretty useful for searching something on system.
Here some uses of it.

1. To find my Apache config file:

$ locate httpd.conf

2. To count to number of results output

$ locate httpd.conf -c

3. To limit the number of results display, 10 for example

$ locate httpd.conf -l 10

Pete Houston

Categories: Bash, Linux Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: