- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Merge the wtmp 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
Forums
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
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
тАО04-13-2005 10:34 PM
тАО04-13-2005 10:34 PM
Therefore , is it possible to merge all logs into one file , so that I can check one time ?
thx in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-13-2005 10:46 PM
тАО04-13-2005 10:46 PM
Re: Merge the wtmp log
cat wtmp.old >> wtmp
for each older file, followed by a delete should do the job.
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
тАО04-13-2005 11:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-13-2005 11:57 PM
тАО04-13-2005 11:57 PM
Re: Merge the wtmp log
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2005 12:15 AM
тАО04-14-2005 12:15 AM
Re: Merge the wtmp log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2005 12:19 AM
тАО04-14-2005 12:19 AM
Re: Merge the wtmp log
$ cat wtmp.1 wtmp.2 wtmp.3 wtmp.4 wtmp.5 > /tmp/wtmp
$ last -f /tmp/wtmp
Otherwise you can use fwtmp to convert wtmp files into ASCII format, 'cat' them together and convert it back into binary format.
$ /usr/sbin/acct/fwtmp < wtmp.1 > /tmp/wtmp.ascii
$ /usr/sbin/acct/fwtmp < wtmp.2 >> /tmp/wtmp.ascii
...
$ /usr/sbin/acct/fwtmp -ic < /tmp/wtmp.ascii > /tmp/wtmp
$ last -f /tmp/wtmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2005 12:27 AM
тАО04-14-2005 12:27 AM
Re: Merge the wtmp log
Furthermore, do you really need to go back as far as November? If the user hasn't logged in for over two months or so, do you really need to know the exact date?
My strategy is different from yours. Once every six months I produce a list of users who haven't logged in so I can ask their managers if I can delete them from the system. Then and only then do I trim the wtmp file - unless it's growing very large, there's really no need.
Mark Syder (like the drink but spelt different)