Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How can I find a user profile Post 302185723 by jim mcnamara on Tuesday 15th of April 2008 04:46:23 PM
Old 04-15-2008
The last command shows logins
Code:
last -100 username

example:
Code:
last jmcnama
jmcnama  pts/4        Tue Apr 15 09:51   still logged in
jmcnama  pts/1        Mon Apr 14 09:02 - 16:33  (07:30)
jmcnama  ftp          Fri Apr 11 12:31 - 12:33  (00:02)
jmcnama  pts/2        Thu Apr 10 08:53 - 16:25 (1+07:31)
jmcnama  pts/2        Wed Apr  9 09:14 - 16:29  (07:14)
jmcnama  pts/2        Tue Apr  8 16:44 - 16:58  (00:14)
jmcnama  ftp          Tue Apr  8 16:34 - 16:35  (00:01)
jmcnama  pts/2        Tue Apr  8 09:05 - 16:37  (07:31)
jmcnama  pts/3        Mon Apr  7 08:55 - 19:12  (10:17)
jmcnama  pts/1        Fri Apr  4 08:57 - 18:46  (09:48)
jmcnama  pts/21       Thu Apr  3 10:57 - 08:56  (21:59)
jmcnama  pts/21       Thu Apr  3 10:21 - 10:57  (00:36)
jmcnama  pts/23       Wed Apr  2 12:48 - 13:38  (00:50)
jmcnama  pts/1        Tue Apr  1 14:09 - 20:06 (1+05:56)
jmcnama  pts/4        Mon Mar 31 09:10 - 20:20  (11:09)
jmcnama  pts/7        Fri Mar 21 09:38 - 16:17  (06:39)
jmcnama  pts/17       Thu Mar 20 11:33 - 20:22  (08:48)
jmcnama  pts/13       Thu Mar 20 11:12 - 11:12  (00:00)
jmcnama  pts/13       Thu Mar 20 11:11 - 11:11  (00:00)
jmcnama  ftp          Tue Mar 18 15:37 - 15:40  (00:02)
........... goes on and on

login count by day and number of logins
Code:
> last jmcnama |\
awk '{arr[$3 $4 $5]++}
     END { for(i in arr) {cnt++}
     print "logins", NR, "days ", cnt }'
logins 254 days  144
>

change the username to whatever you want.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

User profile

Sorry to I am not familiar with script writing , attach is the /etc/profile in my system , we have limit each user can only have one login in the system . When the user login , if the system found the user have a dead process in the system , the system will confirm the user to kill the previous... (1 Reply)
Discussion started by: ust
1 Replies

2. Shell Programming and Scripting

accerssing user profile?

Hello there, I would like to know how can i prevent a normal user (not root user) from accessing his .profile and editing its information? Also, how can i prevent this user from deleting a certain file named "script"? Any help in that? Thanks in advance, (3 Replies)
Discussion started by: charbel
3 Replies

3. UNIX for Dummies Questions & Answers

User Profile

Hi Guys, Im really new with this stuff...could anybody help to guide me ...how do i change/edit user profiile ? (2 Replies)
Discussion started by: gagasan_makmur
2 Replies

4. UNIX for Dummies Questions & Answers

refresh user profile

Scenario: a non-root user is under primary group "devel" and I change their primary group to "nondevel"; I then want to be able to give the user a command which refreshes their user profile so that any new files created under their session are assigned to the new group. What is the command for... (1 Reply)
Discussion started by: dhinge
1 Replies

5. IP Networking

how can i find a user profile

Hi I want to know how can i find a user when he has logged in, at what time and how many days, anyone can help me (1 Reply)
Discussion started by: darwinscp@hotma
1 Replies

6. AIX

Which file has the user profile?

It's been a long time since I've done this and I can't remember which file is needed to edit. I would like to change the prompt for a user on my AIX 5.3 box, but I don't see a .profile file or a rc.ksh file to edit. Which file do I need to edit to get this? (1 Reply)
Discussion started by: bbbngowc
1 Replies

7. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

8. Shell Programming and Scripting

User profile, environment

Hello , i am on sles 11, and i can't figure out how can i locate my profile file, the one that is use for setting the environment when i log in. oracle@r200:~> cd oracle@r200:~> pwd /opt/oracle oracle@r200:~> echo $SHELL /bin/bash oracle@r200:~> oracle@r200:~> cat .profile cat: .profile:... (4 Replies)
Discussion started by: tonijel
4 Replies

9. UNIX for Dummies Questions & Answers

Copying the .profile of one user to another.

I want to copy .Profile file from user1 homedirectoryto user2 homedirectory in Aix. Please help me with the process. (4 Replies)
Discussion started by: Laxxi
4 Replies
PTS_QUIT(1)						       AFS Command Reference						       PTS_QUIT(1)

NAME
pts_quit - Exit from pts interactive mode SYNOPSIS
pts quit [-cell] <cell name> [-noauth] [-localauth] [-force] pts q [-c] <cell name> [-n] [-l] [-f] DESCRIPTION
The pts quit command exits from pts interactive mode. The command can be run from the command line or interactively, but on the command line it does nothing and is therefore of questionable utility. CAUTIONS
Prior to OpenAFS 1.4.5 and OpenAFS 1.5.23, the pts quit command was only available on Unix or Linux and when OpenAFS was compiled with the supergroups option (disabled by default). As of OpenAFS 1.4.5 and 1.5.23, it is always available. OPTIONS
Although they have no effect, pts quit takes the following standard pts options: -cell <cell name> Names the cell in which to run the command. For more details, see pts(1). -force Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the first error. -help Prints the online help for this command. All other valid options are ignored. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or -noauth options. For more details, see pts(1). -noauth Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1). OUTPUT
This command produces no output. EXAMPLES
Here is an example of a pts interactive session: % pts interactive pts> quit % SEE ALSO
pts(1), pts_interactive(1) COPYRIGHT
Copyright 2007 Jason Edgecombe <jason@rampaginggeek.com> This documentation is covered by the BSD License as written in the doc/LICENSE file. This man page was written by Jason Edgecombe for OpenAFS. OpenAFS 2014-04-08 PTS_QUIT(1)
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy