10-02-2010
try it without the exec. See if anything returns.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
Can somebody tell me the difference between /bin, /usr/bin, /sbin ?
Thanx in advance,
Saneesh Joseph (3 Replies)
Discussion started by: saneeshjose
3 Replies
3. Shell Programming and Scripting
Hey everyone,
A coworker of mine has written a csh script that starts with #!/usr/bin/csh -f. It's my understanding that the -f should skip the .cshrc and .login files, but here's the problem: In the script "line" is used, and I happen to have a "line" in my ~/bin. When the script is ran my... (4 Replies)
Discussion started by: effigy
4 Replies
4. UNIX for Dummies Questions & Answers
Hi!
All the basic linux commands, ie. echo, find, etc, are located in /bin. I have a couple of programs that have these commands pointed towards /usr/bin, ie, /usr/bin/echo (even though the actual 'echo' command is in /bin). How can I alias or redirect or link the /usr/bin to /bin just for this... (6 Replies)
Discussion started by: dancerat
6 Replies
5. Solaris
Hi gentlemen.
For what intended is the directory /usr/local/bin? In this directory are some script.
I don't understand how these scripts being in this directory are started.
Each time after registration of the user occurs start of these scripts. These scripts start applications. (7 Replies)
Discussion started by: wolfgang
7 Replies
6. OS X (Apple)
Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself.
But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies
7. Solaris
Hi Experts,
I found that the same commands(sort, du, df, find, grep etc.) exists in both dir.
What is the difference to use them?
i.e: to use xpg4/bin/grep and usr/bin/grep
My OS version is SunOS 5.10
Regards,
Saps (7 Replies)
Discussion started by: saps19
7 Replies
8. UNIX for Dummies Questions & Answers
...... (30 Replies)
Discussion started by: larry burns
30 Replies
9. UNIX for Beginners Questions & Answers
i am new player in linux
what does mean ">& and >&!" in script or command line?
thanks (4 Replies)
Discussion started by: abdossamad2003
4 Replies
LEARN ABOUT OPENSOLARIS
getexecname
getexecname(3C) Standard C Library Functions getexecname(3C)
NAME
getexecname - return pathname of executable
SYNOPSIS
#include <stdlib.h>
const char *getexecname(void);
DESCRIPTION
The getexecname() function returns the pathname (the first argument of one of the exec family of functions; see exec(2)) of the executable
that started the process.
Normally this is an absolute pathname, as the majority of commands are executed by the shells that append the command name to the user's
PATH components. If this is not an absolute path, the output of getcwd(3C) can be prepended to it to create an absolute path, unless the
process or one of its ancestors has changed its root directory or current working directory since the last successful call to one of the
exec family of functions.
RETURN VALUES
If successful, getexecname() returns a pointer to the executables pathname; otherwise, it returns 0.
USAGE
The getexecname() function obtains the executable pathname from the AT_SUN_EXECNAME aux vector. These vectors are made available to dynam-
ically linked processes only.
A successful call to one of the exec family of functions will always have AT_SUN_EXECNAME in the aux vector. The associated pathname is
guaranteed to be less than or equal to PATH_MAX, not counting the trailing null byte that is always present.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO
exec(2), getcwd(3C), attributes(5)
SunOS 5.11 17 Dec 1997 getexecname(3C)