- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: last log
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
Discussions
Discussions
Forums
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
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
тАО02-15-2009 10:46 PM
тАО02-15-2009 10:46 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 11:24 PM
тАО02-15-2009 11:24 PM
Solution/usr/sbin/acct/fwtmp < /var/adm/wtmp > wtmp.cpy
delete old stuff in wtmp.cpy
/usr/sbin/acct/fwtmp -ic < wtmp.cpy > /var/adm/wtmp
Add -X if editing wtmps.
You may lose info during this three step window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 12:02 AM
тАО02-18-2009 12:02 AM
Re: last log
the comamand seems could be run in hp server , can advise if I want to do it at other unix-like server , what can i do ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 12:57 AM
тАО02-18-2009 12:57 AM
Re: last log
/var/adm/wtmp which contain all records for this command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 01:07 AM
тАО02-18-2009 01:07 AM
Re: last log
can advise how to modify the file wtmp ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 01:19 AM
тАО02-18-2009 01:19 AM
Re: last log
#> {file name}
but it will remove all data...and you will get log from now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 01:35 AM
тАО02-18-2009 01:35 AM
Re: last log
but how can I purge the data before 1-Feb ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 03:44 AM
тАО02-18-2009 03:44 AM
Re: last log
There are no other Unix-like servers except for HP-UX or Linux. :-)
You will have to look that info up elsewhere but fwtmp(1M) says it is standard.
>can advise how to modify the file wtmp?
I told you, use fwtmp(1M) to convert to ascii, then edit, then convert back.
>but how can I purge the data before 1-Feb?
You have to edit the ascii version. Either vi or with sed or awk.
Create the ascii file and see how hard it will be.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 11:06 PM
тАО02-18-2009 11:06 PM
Re: last log
I really can't find the command fwtmp in my linux box , also can't find it at rpmfind , can advise if there is other method to do that ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2009 11:23 PM
тАО02-18-2009 11:23 PM
Re: last log
Have you look at the man pages for last, wtmp?
This is the wrong forum for linux questions. you have created another thread there:
http://forums.itrc.hp.com/service/forums/categoryhome.do?categoryId=188