How to select last 7 days entry from SULOG or LAST command


 
Thread Tools Search this Thread
Operating Systems Solaris How to select last 7 days entry from SULOG or LAST command
# 1  
Old 05-03-2010
How to select last 7 days entry from SULOG or LAST command

Hi All,

I need to get last 7 days log entries from sulog. The same has to be done for the last command.

for ex: when i search for a user "abc" in sulog, i only want to check his entries for the last 1 week.

The same has to be done for last command.

Can anyone suggest some tips.

Thanks in Advance

Regards
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Select command

Hi I'm using the "select" command in the global_env.sh to log in to the application directory. This file is called in .bashrc profile. Sample code: Filename: global_env.sh set -o vi export severname=$(uname -n) printf '%s\n%30s\n%s\n' "***********************" "Welcome to $severname"... (6 Replies)
Discussion started by: cheers799
6 Replies

2. Shell Programming and Scripting

sed command to add a new column entry

My input file looks like this 12 3 5.122.281.413 172.31.15.220 3421 4133 2 2 1454 3421 4133 2 2 0 12 44036 214.215.52.146 90.123.245.211 2312 3911 4 4 521 2312 3911 4 4 1 14 504 6.254.324.219 192.61.27.120 4444 5611 7 5 1415 4444 5611 7 5 1 ... (2 Replies)
Discussion started by: sampitosh
2 Replies

3. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies

4. Solaris

/var/adm/sulog does not showing year

Hi, I would like to know is there any way to capture the year in /var/adm/sulog file in solaris 10? Please suggest (2 Replies)
Discussion started by: manoj.solaris
2 Replies

5. Shell Programming and Scripting

select entry from consecutive line awk

Hi folks, I have a file with four columns that looks like the following (tab separated) 1 1 1 a 2 2 2 b 3 3 3 c 4 4 4 d I would like to create a file with always 4 columns but where the third entry corresponds to the thirst entry of the next line and so on, to get the following 1 1 2 a... (4 Replies)
Discussion started by: klebsiella
4 Replies

6. Solaris

hostname or ip information on sulog

Hi, more than one user login the our solaris 10 systems with same user account by using ssh connection. i wanna see ip or hostname information of them on sulog instead of it's terminal number. is this possible? current sulog is like that SU 02/06 08:59 + pts/1 operation-vuser SU 02/07 14:27... (1 Reply)
Discussion started by: sdkbjk
1 Replies

7. AIX

improve sulog

I just wrote a very small script that improves readability on system sulog. The problem with all sulog is there is lack of clarity whether the info you are looking at is the most current. So if you just need a simple soution instead of going thru the trouble of writing a script that rotate logs and... (0 Replies)
Discussion started by: sparcguy
0 Replies

8. Linux

SULOG for LINUX

How to enable sulog activity in LINUX like /var/adm/sulog in Solaris , AIX..... I have added SULOG_FILE /var/log/sulog in /etc/login.defs ...but it is not working ... Thanks a lot for help (1 Reply)
Discussion started by: Anu_1
1 Replies

9. UNIX for Dummies Questions & Answers

Completing Command Entry without Typing

Hi, In my UNIX (KSH) sytem, in order to Complete Command Entry without Typing the whole path or name, I have to use ESC+\ where as I am used to press TAB key to do the same. Can anyone tell me where we need to change the settings of the keyboard combination so that when I press TAB key the file... (6 Replies)
Discussion started by: jisha
6 Replies

10. UNIX for Dummies Questions & Answers

sulog

Hello, the sulog file on solaris does not record the user's attempts. do i have to delete and create a new one or there is a better way? in addition on the current sulog file is shown the month/day of the user's attempt but i like to see the year also. there is a way to see the year or more... (2 Replies)
Discussion started by: grep
2 Replies
Login or Register to Ask a Question
lchage(1)						      General Commands Manual							 lchage(1)

NAME
lchage - Display or change user password policy SYNOPSIS
lchage [OPTION]... user DESCRIPTION
Displays or allows changing password policy of user. OPTIONS
-d, --date=days Set the date of last password change to days after Jan 1 1970. Set days to -1 to disable password expiration (i.e. to ignore --mindays, and --maxdays and related settings). Set days to 0 to enforce password change on next login. (This also disables password expiration until the password is changed.) -E, --expire=days Set the account expiration date to days after Jan 1 1970. Set days to -1 to disable account expiration. -i, --interactive Ask all questions when connecting to the user database, even if default answers are set up in libuser configuration. -I, --inactive=days Disable the account after days after password expires (after the user is required to change the password). Set days to -1 to keep the account enabled indefinitely after password expiration. -l, --list Only list current user's policy and make no changes. -m, --mindays=days Require at least days days between password changes. Set days to 0 or -1 to disable this requirement. If this value is larger than the value set by --maxdays, the user cannot change the pasword. -M, --maxdays=days Require changing the password after days since last password change. Set days to -1 to disable password expiration. -W, --warndays=days Start warning the user days before password expires (before the user is required to change the password). Set days to 0 or -1 to disable the warning. EXIT STATUS
The exit status is 0 on success, nonzero on error. NOTES
Note that "account expiration" (set by --expire) is distinct from "password expiration" (set by --maxdays). Account expiration happens on a fixed date regardless of password changes. Password expiration is relative to the date of last password change. libuser Nov 8 2012 lchage(1)