07-18-2012
This may seem like a silly question, but are you executing the commands under a different user? The commands that you run on root won't be remembered by the regular user.
You may also want to look at .bash_history and see if for some reason it has hit a maximum file size.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
being ordinary user (not having any administrative rights) can avail myself a facility to know who logged and logged out with their timings get popped onto my terminal as if it get echo 'ed... (3 Replies)
Discussion started by: vkandati
3 Replies
2. Programming
Hello all,
i've written a small piece of code that will read commands from standard input and executes the commands.
Its working fine and is execting the commands well. Accepting arguments too. e.g
#mkdir <name of the directory>
The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies
3. UNIX for Advanced & Expert Users
Hi all,
Say my login user id is "t007" and I login into the unix server first using my id and password and then I used to use "su" command to switch the user using root user id and password. Now, how the third person will come to know who has logged in as a first user ?
As:
Login: t007... (2 Replies)
Discussion started by: varungupta
2 Replies
4. Solaris
Hi,
On my server there are so many pacct files in /var/adm. It is eating up my /var partition. Can I delete or gzip those files ?
Thanks
NeeleshG (3 Replies)
Discussion started by: neel.gurjar
3 Replies
5. Programming
I have wrote a service with c++ which is always run and now I want to get with it the exact time in that the user log in or log out and then run a script. but the problem is that how could i find that the user logged in or logged out with out checking something frequently?
thanks (9 Replies)
Discussion started by: mrhosseini
9 Replies
6. Shell Programming and Scripting
I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config.
I am not sure if I can do this with BASH scripting.
I have set up password less login by adding my public key to authorized_keys file, it works.
I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies
7. Shell Programming and Scripting
I have a situation where I have to capture information of all users who log out, along with the terminal info(tty command).
For example, I may have logged in with /dev/pts/2 as well as /dev/pts4.
Now, when I log out of the session with /dev/pts/2, I need that to be sent in an email to a... (1 Reply)
Discussion started by: ggayathri
1 Replies
8. Solaris
Guys,
can u tell me some way in which the commands i execute on solaris system doesnot gets logged. It should not appear in history file.. Is there any shell which provide such solution or can I turn off the logging, if yes then how...
Help will be appreciated
Thanks (2 Replies)
Discussion started by: harpreetrekhi
2 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to write a script to get the user information & the command executed.
I tried something like this :
w | sort | awk '{print$5$6$7}'
My requirement is to identify the users who execute the same command at same time.
I need the user name & the... (2 Replies)
Discussion started by: vijayarajvp
2 Replies
10. Solaris
Who knows if when working in the single user mode that any command are logged or could b elogged specially if I do a fsck I like at least to see when I did start it. (1 Reply)
Discussion started by: manni2
1 Replies
LEARN ABOUT REDHAT
lastcomm
LASTCOMM(1) General Commands Manual LASTCOMM(1)
NAME
lastcomm - print out information about previously executed commands.
SYNOPSIS
lastcomm
[ command-name ... ]
[ user-name ... ]
[ terminal-name ... ]
[ --strict-match ]
[ -f filename | --file filename ]
[ --user name ] [ --command name ] [ --tty name ]
[ --debug ] [ -V | --version ] [ -h | --help ]
DESCRIPTION
lastcomm prints out information about previously executed commands. If no arguments are specified, lastcomm will print info about all of
the commands in acct (the record file). If called with one or more of command-name, user-name, or terminal-name, only records containing
those items will be displayed. For example, to find out which users used command `a.out' and which users were logged into `tty0', type:
lastcomm a.out tty0
This will print any entry for which `a.out' or `tty0' matches in any of the record's fields (command, name, or terminal). If you want to
find only items that match *all* of the arguments on the command line, you must use the '-strict-match' option. For example, to list all
of the executions of command a.out by user root on terminal tty0, type:
lastcomm --strict-match a.out root tty0
The order of the arguments is not important.
For each entry the following information is printed:
+ command name of the process
+ flags, as recorded by the system accounting routines:
S -- command executed by super-user
F -- command executed after a fork but without a following exec
C -- command run in PDP-11 compatibility mode (VAX only)
D -- command terminated with the generation of a core file
X -- command was terminated with the signal SIGTERM
+ the name of the user who ran the process
+ time the process exited
OPTIONS
--strict-match
Print only entries that match *all* of the arguments on the command line.
--user name
List records for user with name. This is useful if you're trying to match a username that happens to be the same as a command
(e.g., ed ).
--command name
List records for command name.
--tty name
List records for tty name.
-f filename, --file filename
Read from the file filename instead of acct
--debug
Print verbose internal information.
-V, --version
Print the version number of lastcomm.
-h, --help
Prints the usage string and default locations of system files to standard output and exits.
FILES
acct
The system wide process accounting file. See acct(5) (or pacct(5)) for further details.
AUTHOR
The GNU accounting utilities were written by Noel Cragg <noel@gnu.ai.mit.edu>. The man page was adapted from the accounting texinfo page by
Susan Kleinmann <sgk@sgk.tiac.net>.
SEE ALSO
last(1), acct(5)
1995 October 31 LASTCOMM(1)