Sponsored Content
Operating Systems Solaris How to select last 7 days entry from SULOG or LAST command Post 302418096 by navdeepan on Monday 3rd of May 2010 04:01:48 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
GIT-REFLOG(1)							    Git Manual							     GIT-REFLOG(1)

NAME
       git-reflog - Manage reflog information

SYNOPSIS
       git reflog <subcommand> <options>

DESCRIPTION
       The command takes various subcommands, and different options depending on the subcommand:

	   git reflog [show] [log-options] [<ref>]
	   git reflog expire [--expire=<time>] [--expire-unreachable=<time>]
		   [--rewrite] [--updateref] [--stale-fix]
		   [--dry-run | -n] [--verbose] [--all | <refs>...]
	   git reflog delete [--rewrite] [--updateref]
		   [--dry-run | -n] [--verbose] ref@{specifier}...
	   git reflog exists <ref>

       Reference logs, or "reflogs", record when the tips of branches and other references were updated in the local repository. Reflogs are
       useful in various Git commands, to specify the old value of a reference. For example, HEAD@{2} means "where HEAD used to be two moves ago",
       master@{one.week.ago} means "where master used to point to one week ago in this local repository", and so on. See gitrevisions(7) for more
       details.

       This command manages the information recorded in the reflogs.

       The "show" subcommand (which is also the default, in the absence of any subcommands) shows the log of the reference provided in the
       command-line (or HEAD, by default). The reflog covers all recent actions, and in addition the HEAD reflog records branch switching. git
       reflog show is an alias for git log -g --abbrev-commit --pretty=oneline; see git-log(1) for more information.

       The "expire" subcommand prunes older reflog entries. Entries older than expire time, or entries older than expire-unreachable time and not
       reachable from the current tip, are removed from the reflog. This is typically not used directly by end users -- instead, see git-gc(1).

       The "delete" subcommand deletes single entries from the reflog. Its argument must be an exact entry (e.g. "git reflog delete master@{2}").
       This subcommand is also typically not used directly by end users.

       The "exists" subcommand checks whether a ref has a reflog. It exits with zero status if the reflog exists, and non-zero status if it does
       not.

OPTIONS
   Options for show
       git reflog show accepts any of the options accepted by git log.

   Options for expire
       --all
	   Process the reflogs of all references.

       --expire=<time>
	   Prune entries older than the specified time. If this option is not specified, the expiration time is taken from the configuration
	   setting gc.reflogExpire, which in turn defaults to 90 days.	--expire=all prunes entries regardless of their age; --expire=never turns
	   off pruning of reachable entries (but see --expire-unreachable).

       --expire-unreachable=<time>
	   Prune entries older than <time> that are not reachable from the current tip of the branch. If this option is not specified, the
	   expiration time is taken from the configuration setting gc.reflogExpireUnreachable, which in turn defaults to 30 days.
	   --expire-unreachable=all prunes unreachable entries regardless of their age; --expire-unreachable=never turns off early pruning of
	   unreachable entries (but see --expire).

       --updateref
	   Update the reference to the value of the top reflog entry (i.e. <ref>@{0}) if the previous top entry was pruned. (This option is
	   ignored for symbolic references.)

       --rewrite
	   If a reflog entry's predecessor is pruned, adjust its "old" SHA-1 to be equal to the "new" SHA-1 field of the entry that now precedes
	   it.

       --stale-fix
	   Prune any reflog entries that point to "broken commits". A broken commit is a commit that is not reachable from any of the reference
	   tips and that refers, directly or indirectly, to a missing commit, tree, or blob object.

	   This computation involves traversing all the reachable objects, i.e. it has the same cost as git prune. It is primarily intended to fix
	   corruption caused by garbage collecting using older versions of Git, which didn't protect objects referred to by reflogs.

       -n, --dry-run
	   Do not actually prune any entries; just show what would have been pruned.

       --verbose
	   Print extra information on screen.

   Options for delete
       git reflog delete accepts options --updateref, --rewrite, -n, --dry-run, and --verbose, with the same meanings as when they are used with
       expire.

GIT
       Part of the git(1) suite

Git 2.17.1							    10/05/2018							     GIT-REFLOG(1)
All times are GMT -4. The time now is 02:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy