pavement

Where

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
m (Reverted edits by 147.8.104.142 (Talk); changed back to last version by Jimbo)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is a very useful system command used to find out how many different versions of the same command or file you have strewn throughout your [[path]] and in which order they will be found if you don't specify a path when asking for one.  For example:
+
'''where''' is a very useful system command used to find out how many different versions of the same command or file you have strewn throughout your [[path]] and in which order they will be found if you don't specify a path when asking for one.  For example:
  
  '''ph34r#''' where time
+
  ph34r#''' where time'''
'''time: shell built-in'''
+
time: shell built-in
  '''/usr/bin/time'''
+
  /usr/bin/time
  '''ph34r#'''
+
  ph34r#
  
See also [[which]] for just finding out where the first returned program name from your [[path]] directory is without bothering to list all the others.
+
See also [[which]] for just finding out where the first returned program name from your [[path]] directory is without bothering to list all the others, or [[whereis]] for finding man pages and sources as well as the program itself.
  
 
[[Category:System Commands]]
 
[[Category:System Commands]]

Latest revision as of 12:37, 10 November 2007

where is a very useful system command used to find out how many different versions of the same command or file you have strewn throughout your path and in which order they will be found if you don't specify a path when asking for one. For example:

ph34r# where time
time: shell built-in
/usr/bin/time
ph34r#

See also which for just finding out where the first returned program name from your path directory is without bothering to list all the others, or whereis for finding man pages and sources as well as the program itself.

Personal tools