The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 10-06-2008
ksr.test ksr.test is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 12
Quote:
Originally Posted by otheus View Post
You can just grep the output of tail:

Code:
USER=john
RHOST=in.com
tail -f logs/application.log | grep "user $USER"
The other thing you can do is install pam_script and set up a "onsessionopen" and "onsessionclose" script which will generate such a logfile, and is guaranteed to run (unless sshd is killed with -9).
by above grep command we are getting the lines which contains that particular user id right ?