Sponsored Content
Full Discussion: most effective search ?
Top Forums UNIX for Dummies Questions & Answers most effective search ? Post 29602 by minazk on Wednesday 9th of October 2002 09:18:40 AM
Old 10-09-2002
Also, in some OS's you will find the "which" command.
It searches for any kind of executables or files in the directories mentioned in the PATH & displays the absolute path of the file.

Usage :

#which "filename"
minazk
 

8 More Discussions You Might Find Interesting

1. Cybersecurity

Changing effective user

I would like to give execution rights for a script to one user. (that's the easy part...) When that user is running the script, I would like the effective user ID to be that of the file-owner. Is this possible? (6 Replies)
Discussion started by: hilmel
6 Replies

2. UNIX for Dummies Questions & Answers

Variables for Effective Username?

Hey all, I'm glad to have found this forum as I'm trying to dive head first into Solaris 8 - been working with it for a few months now and am finally getting a bit comfortable with the layout and concepts. In any case, on to the questions... :D I was wondering how I would go about displaying... (3 Replies)
Discussion started by: QuadMonk
3 Replies

3. UNIX for Dummies Questions & Answers

Changing the Effective Group ID

Here is my situation. On a RedHat 7.3 box, I have a user named jody. When I log in with jody and type in "id", I get the expected output: uid=1(jody) gid=1(jody) groups=1(jody), 510(test) However, I cannot figure which "id" option allows me to change the effective gid. I tried the options... (2 Replies)
Discussion started by: Jody
2 Replies

4. Shell Programming and Scripting

what is the most effective way to process a large logfile?

I am dealing with a very large firewall logfile (more than 10G), the logfile like this *snip* Nov 9 10:12:01 testfirewall root: Nov 9 10:12:01 testfirewall root: 0:00:11 accept testfw01-hme0 >hme0 proto: icmp; src: test001.example.net; dst: abc.dst.net; rule: 1; icmp-type: 8;... (8 Replies)
Discussion started by: fedora
8 Replies

5. UNIX for Dummies Questions & Answers

Real and Effective IDs

Can anyone explain me in details of Real and Effective IDs (6 Replies)
Discussion started by: kkalyan
6 Replies

6. UNIX for Dummies Questions & Answers

[Solved] effective user id upon exec

Hello all. Despite the exec man page, the exec system call seems to turn my effective-user-id into my real-user-id. I coded and compiled 2 very simple c programs as user 1 (uid=501) The first one (A) prints real and effective user IDs and then execs the second one (B), which in turn prints... (7 Replies)
Discussion started by: oviv
7 Replies

7. Cybersecurity

Password rules not effective

I was looking for a good list of words to exclude people from using as passwords, i.e. those that could be guessed easily. I'm working through a whole bunch of suggestions from skullsecurity.org, but I managed to find this page that seems to suggest I have more options than I thought. :b: I... (1 Reply)
Discussion started by: rbatte1
1 Replies

8. Programming

About uncopyable class (on book:Effective C++)

See the following code: #include<iostream> using namespace std; class Uncopyable { protected: Uncopyable(){cout<<"hehe\n";} ~Uncopyable(){} private: Uncopyable(const Uncopyable &rhs){cout<<"oooops\n";}; Uncopyable& operator=(const Uncopyable &rhs); }; class Dog :... (5 Replies)
Discussion started by: vistastar
5 Replies
pathfind(3GEN)					     String Pattern-Matching Library Functions					    pathfind(3GEN)

NAME
pathfind - search for named file in named directories SYNOPSIS
cc [ flag ... ] file ... -lgen [ library ... ] #include <libgen.h> char *pathfind(const char *path, const char *name, const char *mode); DESCRIPTION
The pathfind() function searches the directories named in path for the file name. The directories named in path are separated by colons (:). The mode argument is a string of option letters chosen from the set [rwxfbcdpugks]: +-----------------------------+-----------------------------+ | Letter | Meaning | +-----------------------------+-----------------------------+ |r |readable | +-----------------------------+-----------------------------+ |w |writable | +-----------------------------+-----------------------------+ |x |executable | +-----------------------------+-----------------------------+ |f |normal file | +-----------------------------+-----------------------------+ |b |block special | +-----------------------------+-----------------------------+ |c |character special | +-----------------------------+-----------------------------+ |d |directory | +-----------------------------+-----------------------------+ |p |FIFO (pipe) | +-----------------------------+-----------------------------+ |u |set user ID bit | +-----------------------------+-----------------------------+ |g |set group ID bit | +-----------------------------+-----------------------------+ |k |sticky bit | +-----------------------------+-----------------------------+ |s |size non-zero | +-----------------------------+-----------------------------+ Options read, write, and execute are checked relative to the real (not the effective) user ID and group ID of the current process. If name begins with a slash, it is treated as an absolute path name, and path is ignored. An empty path member is treated as the current directory. A slash (/) character is not prepended at the occurrence of the first match; rather, the unadorned name is returned. EXAMPLES
Example 1 Example of finding the ls command using the PATH environment variable. To find the ls command using the PATH environment variable: pathfind (getenv ("PATH"), "ls", "rx") RETURN VALUES
The pathfind() function returns a (char *) value containing static, thread-specific data that will be overwritten upon the next call from the same thread. If the file name with all characteristics specified by mode is found in any of the directories specified by path, then pathfind() returns a pointer to a string containing the member of path, followed by a slash character (/), followed by name. If no match is found, pathname() returns a null pointer, ((char *) 0). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), test(1), access(2), mknod(2), stat(2), getenv(3C), attributes(5) NOTES
The string pointed to by the returned pointer is stored in an area that is reused on subsequent calls to pathfind(). The string should not be deallocated by the caller. When compiling multithreaded applications, the _REENTRANT flag must be defined on the compile line. This flag should only be used in mul- tithreadedapplications. SunOS 5.11 10 Mar 1999 pathfind(3GEN)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy