Solved

Linux lastb -t not filtering by time

Posted on 2013-11-21
3
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

729 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