Results 1 to 2 of 2
hello everybody.
I got one problem.
I wanna trace user's command input history.
but I dont plan to use "history", "lastcomm" becauze there is not detail of the user command ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-15-2010 #1Linux Newbie
- Join Date
- Feb 2009
- Posts
- 101
any help for trace user's command.
hello everybody.
I got one problem.
I wanna trace user's command input history.
but I dont plan to use "history", "lastcomm" becauze there is not detail of the user command history.
if there is some software use to log user command to one file or database, it's suit for me.
any help for me ? thank you very much.
- 07-16-2010 #2Linux User
- Join Date
- Mar 2008
- Posts
- 287
any help for trace user's command.
Firstly, I am perplexed by your comment "there is not detail of the user command history.". Are you looking for time and date?
Have you tried !?xxxx? where xxxx is what you are looking for in the history file. Appending "
" will not execute the command retrieved. This would require su-ing to the user. The user's commands are listed in sequential order and numbered. Probably it is needless to point out the use of "history | grep -i xxxx". Copy the history to a file before starting to edit it -- oops that's my failure type!
I found my history file at /usr/man/man3p/history.3.gz
Hope this has helped a little bit.


Reply With Quote
