I find it is less code and especially less testing to do the once-daily or once-hourly housekeeping tasks in shell, especially when shell has many handy tools for that, and do just the need-for-speed bits in very simple C. I am not much into system calls, popen() occasionally so as not to have to rewrite thing and so as to get multiprocessing. I did find this was a nice system call, if you want a sort, like in COBOL (-:
So, was access() what you needed?
Hi All,
The scenario is like this:
There is a process say "A" which create a child process say "B" if some condition is true and process "A" terminates. "B" invokes some C program say "C" using 'execl' function. The job of program "C" is to keep polling the server until the server will be up.... (2 Replies)
hi
what is the shell programming code to know the number of processes currently running on the machine & information about those processes.
Another one is the configuration and usage of the UNIX file system?
requesting all for help.
thanks (1 Reply)
When I typed in ps -a I get this:
PID TTY TIME CMD
31799 pts/3 00:00:00 vim
31866 pts/3 00:00:00 vim
And to check who is currently logged in, I type who
Felix Whoals
Tada Whoals
Lala Whoals
How can I get the user process for all current users who logged in?? I think I need to combine... (14 Replies)
Hi all,
When I issued command ps -ef|grep Vinay in a UNIX machine,
I got the following
Vinay 22491 1 255 Jun 18 ? 294248:53 -sh
Vinay 26628 1 255 Jun 18 ? 294237:33 -sh
Could you tell me what all process is running ? Please explain each of the fields.
Thanks... (4 Replies)
Hello
root@ne-ocadev-1:/root/scripts>su espos -c find /a35vol100/ESPOS/oracle/db/9.2.0/oradata/ESPOS/archive -type f -atime +10 -exec ls {}
shell-init: could not get current directory: getcwd: cannot access parent directories: Permission denied
find: insufficient number of... (6 Replies)
Hi
want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris.
Purpose : while running perf. test, needs to find where is the bottleneck.
We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Hello
I've got a server with multiple NICS. In a script I want to log the outbound interface. Is there an easy way I can do this so that the output looks something like this:
host(xxx.xxx.xxx.xxx): Opening connection to ...
Obviously, getting the host is simple with hostname. But how... (4 Replies)
I have been having some trouble trying to get some code working, so I was wondering...what system calls are required to execute a different program from an already running process? (1 Reply)
We have written a bare bones scheduling app using bash scripts. The input to the scheduler is from a mainframe scheduling tool, and the scripts exit code is returned to the MF. The problem is that every now and again I have a script that does not complete and this is left in my Q. I am in the... (1 Reply)
In any non-root account, whenever I enter mail, it gives me:
/var/spool/mail/root: Permission deniedI am not logged in as root, why is mail accessing root's mailbox ?
I am unable to enter the currently logged in user's mailbox.
Any help is appreciated :) (2 Replies)
Discussion started by: Hijanoqu
2 Replies
LEARN ABOUT HPUX
pathfind
pathfind(3G)pathfind(3G)NAME
pathfind() - search for named file in named directories
SYNOPSIS DESCRIPTION
searches the directories named in path for the file name. The directories named in path are separated by colons. mode is a string of
option letters chosen from the set
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 nonzero
Options read, write, and execute are checked relative to the real (not the effective) user ID and group ID of the current process.
If the file name, with all the characteristics specified by mode, is found in any of the directories specified by path, then returns a
pointer to a string containing the member of path, followed by a slash character followed by name.
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. is not prepended at the occurrence of the first match; rather, the unadorned
name is returned.
To use this interface, link in the libgen library by specifying For example:
RETURN VALUE
If no match is found, returns a null pointer,
EXAMPLES
To find the command using the environment variable:
WARNINGS
The string pointed to by the returned pointer is stored in a static area that is reused on subsequent calls to
SEE ALSO sh(1), test(1), access(2), mknod(2), stat(2), getenv(3C), thread_safety(5).
pathfind(3G)