Solved

Linux: last (past hour only)

Posted on 2013-11-14
2
353 Views
Last Modified: 2013-11-15
last

Open in new window

How can I limit the results to include only login attempts during the past hour only?
0
Comment
Question by:hankknight
2 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 39650144
try this

last | grep "`date | cut -d':' -f1`"
0
 
LVL 48

Expert Comment

by:Tintin
ID: 39652914
Alternatively

last |grep "$(date +"%b %d %H:")"
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS - HAProxy- KeepAlived 5 51
How to install Ubuntu 16 in DELL venue 8 pro 20 286
error log using ftp 7 56
Apache LDAP Authentication 20 30
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

856 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