Sponsored Content
Top Forums Programming keep track of the last 10 commands the user typed Post 302089152 by blowtorch on Sunday 17th of September 2006 08:48:00 PM
Old 09-17-2006
What exactly are you trying to do? Are you supposed to take the action when the user gives in "history" as the command?

Another thing, what is argc[0]? Is argc also an array?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Possible to track FTP user last login? Last and Finger don't track them.

Like the topic says, does anyone know if it is possible to check to see when an FTP only user has logged in? Because the shell is /bin/false and they are only using FTP to access the system doing a "finger" or "last" it says they have never logged in. Is there a way to see when ftp users log in... (1 Reply)
Discussion started by: LordJezo
1 Replies

2. Shell Programming and Scripting

keep track of every user

dear all , I m new to shell programming and I need your help. Actually i want to keep track of all the commands executed in a bash prompt of users , very much in same manner as it is displayed when we run "history" command. now the users are smart enough as they delete their history by... (6 Replies)
Discussion started by: xander
6 Replies

3. UNIX for Advanced & Expert Users

Track user commands

Hi, I have a unix server and I am concerned about the security on that server. I would like to be able to write a script that records all the commands that were typed at the command prompt before the user calls the 'history -c' command and deletes all the history. I was thinking about firing or... (7 Replies)
Discussion started by: mishkamima
7 Replies

4. UNIX for Dummies Questions & Answers

Track user

Hi, i suddenly realized that a directory is deleted unfortunately there are many user have pervilages on this directory is there a way to track the user who delete this directory or atleast from now can i enable something so that i can track from now I think there is way from... (2 Replies)
Discussion started by: crackgeek
2 Replies

5. Homework & Coursework Questions

Track user log!

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: The task is to measure the density of users that are logged on system. The program should check that every 30... (7 Replies)
Discussion started by: petel1
7 Replies

6. AIX

"/" doesn't work on command prompt for searching commands last typed

When I use "/" to look for a particular command that I typed in the current session it says D02:-/home/user1/temp> /job ksh: /job: not found. D02:-/home/user1/temp> previously it used to fetch all the commands which had job in it.. for example subjob, endjob, joblist etc... may I... (7 Replies)
Discussion started by: meetzap
7 Replies

7. AIX

track commands run as root after sudo

I'm looking for a way to track commands that are run as root after a user runs sudo su - root. I have a profile set up for root that will track the commands by userid but if we change the shell it only stores it in that shells history file. (2 Replies)
Discussion started by: toor13
2 Replies

8. UNIX for Dummies Questions & Answers

How to track user activity?

Hi All Please can you help me with the following issue: A certain vendor installed an application in which for a user to log in; the user must use a user created/predefined by the application. And because this application has more than one user its difficult to track who did what and when,... (6 Replies)
Discussion started by: fretagi
6 Replies

9. UNIX for Advanced & Expert Users

Track activity of a user

Hi All We have a job which writes files to a server at a particular time. The files will be created by a particular user ID Today, during the execution of the job, it created a file to the server and the file sat on the server for sometime, but was deleted immediately at the end of the... (4 Replies)
Discussion started by: sparks
4 Replies

10. Shell Programming and Scripting

Need to track what Commands run in a login session

Hi I need to track what commands run in login session in solaris whether it is root or any normal users in bash shell. My actual requirement is that when a user (nomal/root) login into the system, whatever commands he run, it should log into file on specified path . I don't require command... (4 Replies)
Discussion started by: hb00
4 Replies
explain_execvp(3)					     Library Functions Manual						 explain_execvp(3)

NAME
explain_execvp - explain execvp(3) errors SYNOPSIS
#include <libexplain/execvp.h> const char *explain_execvp(const char *pathname, char *const *argv); const char *explain_errno_execvp(int errnum, const char *pathname, char *const *argv); void explain_message_execvp(char *message, int message_size, const char *pathname, char *const *argv); void explain_message_errno_execvp(char *message, int message_size, int errnum, const char *pathname, char *const *argv); DESCRIPTION
These functions may be used to obtain explanations for errors returned by the execvp(3) system call. explain_execvp const char *explain_execvp(const char *pathname, char *const *argv); The explain_execvp function is used to obtain an explanation of an error returned by the execvp(3) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (execvp(pathname, argv) < 0) { fprintf(stderr, "%s ", explain_execvp(pathname, argv)); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_execvp_or_die(3) function. pathname The original pathname, exactly as passed to the execvp(3) system call. argv The original argv, exactly as passed to the execvp(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_errno_execvp const char *explain_errno_execvp(int errnum, const char *pathname, char *const *argv); The explain_errno_execvp function is used to obtain an explanation of an error returned by the execvp(3) system call. The least the mes- sage will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (execvp(pathname, argv) < 0) { int err = errno; fprintf(stderr, "%s ", explain_errno_execvp(err, pathname, argv)); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_execvp_or_die(3) function. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the execvp(3) system call. argv The original argv, exactly as passed to the execvp(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_message_execvp void explain_message_execvp(char *message, int message_size, const char *pathname, char *const *argv); The explain_message_execvp function may be used to obtain an explanation of an error returned by the execvp(3) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (execvp(pathname, argv) < 0) { char message[3000]; explain_message_execvp(message, sizeof(message), pathname, argv); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_execvp_or_die(3) function. message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. pathname The original pathname, exactly as passed to the execvp(3) system call. argv The original argv, exactly as passed to the execvp(3) system call. explain_message_errno_execvp void explain_message_errno_execvp(char *message, int message_size, int errnum, const char *pathname, char *const *argv); The explain_message_errno_execvp function may be used to obtain an explanation of an error returned by the execvp(3) system call. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (execvp(pathname, argv) < 0) { int err = errno; char message[3000]; explain_message_errno_execvp(message, sizeof(message), err, pathname, argv); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_execvp_or_die(3) function. message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the execvp(3) system call. argv The original argv, exactly as passed to the execvp(3) system call. SEE ALSO
execvp(3) execute a file explain_execvp_or_die(3) execute a file and report errors COPYRIGHT
libexplain version 0.52 Copyright (C) 2009 Peter Miller explain_execvp(3)
All times are GMT -4. The time now is 06:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy