Solved

Linux lastb -t not filtering by time

Posted on 2013-11-21
3
218 Views
Last Modified: 2013-11-22
This returns all results:
lastb -t 20131121103311

Open in new window

How can I get results only that are newer than the date specified?
0
Comment
Question by:hankknight
3 Comments
 
LVL 10

Expert Comment

by:c_a_n_o_n
ID: 39666774
Not necessarily the answer, but maybe add a number to show like, show the last 10 up to that date.  
lastb -10 -t 20131121103311

Open in new window

0
 
LVL 16

Author Comment

by:hankknight
ID: 39666810
That is not helpful.  My question is regarding limiting results by date not by quantity.
0
 
LVL 19

Accepted Solution

by:
simon3270 earned 500 total points
ID: 39668505
"lastb" (bad logins) doesn't take the "-t" parameter, only "last" (successful logins) does.

You can get what you want by using "last", but explicitly pointing it at the bad login file:
last -f /var/log/btmp -t 20131121103311

Open in new window

0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question