Finding Binaries

Background

Trying to explore the various avenues for finding binaries in Linux & MS Windows.

Linux

Outline

  1. locate
  2. which

Command

locate

Outline

locate reads one or more databases prepared by updatedb and writes
file names matching to standard output, one per line.

By default, locate does not check whether files found in database still
exist. locate can never report files created after the most recent
update of the relevant database.

 

Syntax
locate [command]

Syntax

locate ilist

Output

linux_locate_20180912_0402PM

which

Outline

Which takes one or more arguments. For each of its arguments it prints
to stdout the full path of the executables that would have been exe-
cuted when this argument had been entered at the shell prompt. It does
this by searching for an executable or script in the directories listed
in the environment variable PATH using the same algorithm as bash.

Syntax

which [command]

Sample

which ilist

Output

linux_which_20180912_0254PM.PNG

 

MS Windows

Outline

  1. where

Command

where

Outline

Displays the location of files that match the search pattern.
By default, the search is done along the current directory and in the paths specified by the PATH environment variable.

Syntax

where [command]

Sample

where ilist

Output

where_20180912_0411PM

Leave a Reply

Please log in using one of these methods to post your comment:

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