Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to find a command in Unix? Post 1290 by mib on Thursday 22nd of February 2001 02:49:07 AM
Old 02-22-2001

use whereis to locate programs

whereis mkdir

Quote:
The whereis utility checks the standard binary, manual page, and source directories for the specified programs, printing out the paths of any it finds.
or use locate
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find a file in UNIX without find command?

given a start directory,a filename,how to find it? (3 Replies)
Discussion started by: bluo
3 Replies

2. UNIX for Dummies Questions & Answers

The UNIX find command

Hi All, I trying to get my head around using the find command and i wanted to list a selection of files that are older than 30 days. i used 'find . -mtime +30' and it lists all the files including other files from the current location's sub directory. i then used the prune option but it seems it... (5 Replies)
Discussion started by: scriptingmani
5 Replies

3. Shell Programming and Scripting

Little bit weired : Find files in UNIX w/o using find or where command

Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same. Thanks in advance. Regards Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies

4. UNIX for Dummies Questions & Answers

unix find command

I need help with tweaking the unix find command. currently the find command searches all the directories under $div/users modified in the last 1 day. find $div/users -type d -mtime +1 I need this changed to find only subdirectories and sub-subdirectories modified in the last 1 day under... (1 Reply)
Discussion started by: mnnarendra
1 Replies

5. Shell Programming and Scripting

unix find command

I need help with tweaking the unix find command. currently the find command searches all the directories under $div/users modified in the last 1 day. find $div/users -type d -mtime +1 I need this changed to find only subdirectories and sub-subdirectories modified in the last 1 day under... (3 Replies)
Discussion started by: mnnarendra
3 Replies

6. Shell Programming and Scripting

What is find and replace command in unix?

hello forum memvers, 1:I have to write a script for find a string and replace with another string. 2:In shell script how to replace one string with another string.:b: (4 Replies)
Discussion started by: rajkumar_g
4 Replies

7. UNIX for Dummies Questions & Answers

unix find command

This command is intended to compare two drives to see if all files are identical, can some one please decode what it is doing. find / -path /proc -prune -o -path /new-disk -prune -o -xtype f -exec cmp {} /new-disk{} \; (2 Replies)
Discussion started by: Tirmazi
2 Replies

8. Homework & Coursework Questions

Unix find and head command help

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: I've been stuck on this problem for 2 days now What command would you enter to list the first lines of all text... (11 Replies)
Discussion started by: partieboi37
11 Replies
WHICH(1)						    BSD General Commands Manual 						  WHICH(1)

NAME
which -- locate a program file in the user's path SYNOPSIS
which [-as] program ... DESCRIPTION
The which utility takes a list of command names and searches the path for each executable file that would be run had these commands actually been invoked. The following options are available: -a List all instances of executables found (instead of just the first one of each). -s No output, just return 0 if any of the executables are found, or 1 if none are found. Some shells may provide a builtin which command which is similar or identical to this utility. Consult the builtin(1) manual page. SEE ALSO
builtin(1), csh(1), find(1), locate(1), whereis(1) HISTORY
The which command first appeared in FreeBSD 2.1. AUTHORS
The which utility was originally written in Perl and was contributed by Wolfram Schneider <wosch@FreeBSD.org>. The current version of which was rewritten in C by Daniel Papasian <dpapasia@andrew.cmu.edu>. BSD
June 21, 2002 BSD
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy