- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how do I know the year of dates in the output ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2004 10:43 AM
12-09-2004 10:43 AM
how do I know the year of dates in the output of "last" command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2004 11:11 AM
12-09-2004 11:11 AM
Re: how do I know the year of dates in the output of "last" command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2004 11:14 AM
12-09-2004 11:14 AM
Re: how do I know the year of dates in the output of "last" command
might not be exactly what your looking for, but cat /etc/wtmp | /usr/sbin/acct/fwtmp will give you the year.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2004 11:18 AM
12-09-2004 11:18 AM
Re: how do I know the year of dates in the output of "last" command
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2004 05:09 PM
12-09-2004 05:09 PM
Re: how do I know the year of dates in the output of "last" command
If you do not want to go to wtmp, then you can compare the current day with the 'last' day and assume that any 'future' time is in fact in the paste, and claim it to be last year.
FOr an example of this, see my response in:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=726662
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2004 06:43 PM
12-09-2004 06:43 PM
Re: how do I know the year of dates in the output of "last" command
strings /var/adm/wtmp
Will give you some information as to the year of the log entries.
This system probably isn't very busy or has never had a log rotation if you've got data that old in it.
Its a very good idea to trim the logs once in a while. On my light duty systems, the following command is run on logs once a month in cron.
> /var/adm/wtmp
> /var/adm/btmp
...
other log files
Just a part of the housekeeping we have to do.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2004 06:46 PM
12-09-2004 06:46 PM
Re: how do I know the year of dates in the output of "last" command
Trim it regularly to stop /var from filling!
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2004 02:24 AM
12-10-2004 02:24 AM
Re: how do I know the year of dates in the output of "last" command
Did last -1 really give the latest login? and what if I wanted to add the year in each last -1 output.
As some of you suggested, fwtmp/strings would show me the year, but it is not really what I want. I just want find out the LATEST login, including MM/DD/YY.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2004 04:27 AM
12-10-2004 04:27 AM
Re: how do I know the year of dates in the output of "last" command
/usr/lbin/getprpw -m slogint,ulogint
This will show last successful login and last unsuccessful login, complete date including year. It's the information shown during a login. The man page for getprwpw is only on 11.11 systems but you can find it at docs.hp.com. For a non-trusted system, you'll have to use fwtmp.
Bill Hassell, sysadmin