Sponsored Content
Top Forums UNIX for Dummies Questions & Answers difference of find,locate and whereis Post 302214863 by cromohawk on Tuesday 15th of July 2008 05:15:04 AM
Old 07-15-2008
difference of find,locate and whereis

hi guys,
may i know the difference of find,locate and whereis ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

whereis ls

When I execute the following: <pre> $ whereis ls ls: /usr/bin/ls /usr/ucb/ls $ pwd /bin $ ls -la ls -r-xr-xr-x 1 bin bin 18120 Oct 6 1998 ls </pre> ....but as you can see the 'ls' command is in the /bin directory AS WELL. Why doesn't show up on 'whereis'??? Thanks (3 Replies)
Discussion started by: guest100
3 Replies

2. UNIX for Dummies Questions & Answers

Difference between locate and find

I was wondering what the difference was between the two commands, I understand that locate won't search for files with certain permissions set. Are there any others? Thanks (1 Reply)
Discussion started by: camerja1
1 Replies

3. Shell Programming and Scripting

using find to locate hard and soft links with tar

I am digging for certain types of files in the current directory and all its sub-directories and archiving them with the following code: #! /usr/bin/ksh Archive=`date +%Y_%m_%d_%T` find . -type f \( -name \*\.ksh -o -name \*\.sql -o -name \*\.ini \) -print|xargs tar -cf... (4 Replies)
Discussion started by: manthasirisha
4 Replies

4. Homework & Coursework Questions

Help with find/whereis C Shell Script

Use and complete the template provided. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a C Shell Script called "hunt" that takes a filename as it's single parameter and displays the full pathname of every file name that matches,... (1 Reply)
Discussion started by: new2C
1 Replies

5. UNIX for Dummies Questions & Answers

Find difference in two files

Hola, Tengo un texto texto1.txt con el siguiente contenido: Malaga Cadiz Sevilla Hola Y otro .txt texto2.txt con: Malaga Cadiz Sevilla Cordoba Huelva quiero obtener en otro .txt la diferencia entre estos dos archivos: (14 Replies)
Discussion started by: danietepa
14 Replies

6. Homework & Coursework Questions

Need help using find or locate with wildcards

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: List all files in ~c12100 directory beginning with "BOZO" that end with either "123" or "456" 2. Relevant... (3 Replies)
Discussion started by: ScarletRavin
3 Replies

7. UNIX for Dummies Questions & Answers

command difference - find

Hi, What is the difference between these two? find /some_dir -type f -exec chmod 070 {} \; and chmod 070 `find /some_dir -type f` Thanks (5 Replies)
Discussion started by: lamont
5 Replies

8. Shell Programming and Scripting

How to find time difference?

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 ================================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (1 Reply)
Discussion started by: wnaguib
1 Replies

9. Shell Programming and Scripting

Find with in loops and then difference

Hi All, Please find my problem below: I have a file at two different nodes dev and test 1st find> find /u/dev/local/abc -name ab.dat --Since this file can be in several sub directories 2nd find> find /u/test/local/abc -name ab.dat I find my 1st find result and do compare with 2nd... (5 Replies)
Discussion started by: varun_bharadwaj
5 Replies

10. Shell Programming and Scripting

To find Difference

Hi Friends, I need to find the difference between two files , File_1 contained 4 columns, and File_2 contained 4 columns, I need to find the difference using 1st column, Or need to find the difference using 3st column, (6 Replies)
Discussion started by: Shenbaga.d
6 Replies
WHEREIS(1)						    BSD General Commands Manual 						WHEREIS(1)

NAME
whereis -- locate programs SYNOPSIS
whereis [-abmqsux] [-BMS dir ... -f] program ... DESCRIPTION
The whereis utility checks the standard binary, manual page, and source directories for the specified programs, printing out the paths of any it finds. The supplied program names are first stripped of leading path name components, any single trailing extension added by gzip(1), compress(1), or bzip2(1), and the leading 's.' or trailing ',v' from a source code control system. The default path searched is the string returned by the sysctl(8) utility for the ``user.cs_path'' string, with /usr/libexec and the current user's $PATH appended. Manual pages are searched by default along the $MANPATH. Program sources are located in a list of known standard places, including all the subdirectories of /usr/src and /usr/ports. The following options are available: -B Specify directories to search for binaries. Requires the -f option. -M Specify directories to search for manual pages. Requires the -f option. -S Specify directories to search for program sources. Requires the -f option. -a Report all matches instead of only the first of each requested type. -b Search for binaries. -f Delimits the list of directories after the -B, -M, or -S options, and indicates the beginning of the program list. -m Search for manual pages. -q (``quiet''). Suppress the output of the utility name in front of the normal output line. This can become handy for use in a back- quote substitution of a shell command line, see EXAMPLES. -s Search for source directories. -u Search for ``unusual'' entries. A file is said to be unusual if it does not have at least one entry of each requested type. Only the name of the unusual entry is printed. -x Do not use ``expensive'' tools when searching for source directories. Normally, after unsuccessfully searching all the first-level subdirectories of the source directory list, whereis will ask locate(1) to find the entry on its behalf. Since this can take much longer, it can be turned off with -x. EXAMPLES
The following finds all utilities under /usr/bin that do not have documentation: whereis -m -u /usr/bin/* Change to the source code directory of ls(1): cd `whereis -sq ls` SEE ALSO
find(1), locate(1), man(1), which(1), sysctl(8) HISTORY
The whereis utility appeared in 3.0BSD. This version re-implements the historical functionality that was lost in 4.4BSD. AUTHORS
This implementation of the whereis command was written by Jorg Wunsch. BUGS
This re-implementation of the whereis utility is not bug-for-bug compatible with historical versions. It is believed to be compatible with the version that was shipping with FreeBSD 2.2 through FreeBSD 4.5 though. The whereis utility can report some unrelated source entries when the -a option is specified. BSD
August 22, 2002 BSD
All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy