- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /var/adm has two wtmp files
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
05-31-2002 02:27 PM
05-31-2002 02:27 PM
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 02:33 PM
05-31-2002 02:33 PM
Re: /var/adm has two wtmp files
You should not create or delete the wtmp file.
You can just issue a command
#cat /dev/null > /var/adm/wtmp
or
# > /var/adm/wtmp
This will automatically make the size of wtmp file as 0.
You can delete the new file which you have created.
Execute the who or last command and if they are giving you the output then your wtmp file is OK.
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 02:37 PM
05-31-2002 02:37 PM
SolutionThe working one is the active one. I suspect that you ended up naming the other (zero length) one with non-printable (viewable) characters. To expose them do:
# ls -lib /var/adm/wtmp
This also adds the inode to the listing.
Note which file is which and do:
# rm -i /var/adm/wtmp
Respond "y" to the one you want removed.
In the future, if you want to null the file to record from that point foward, do:
# cat /dev/null > /var/adm/wtmp
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 02:54 PM
05-31-2002 02:54 PM
Re: /var/adm has two wtmp files
The long list (ll) command lists two wtmp files. The command suggested by Mr Ferguson ls -lib /var/adm/wtmp listed only one. The rm -i/var/adm/wtmp also listed only one file.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 02:58 PM
05-31-2002 02:58 PM
Re: /var/adm has two wtmp files
So your problem is solved now....r u getting the proper output of who and last ??
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 06:26 PM
05-31-2002 06:26 PM
Re: /var/adm has two wtmp files
I also suspect there is an unprintable character (or more) in one of the file names. Try the commands James suggests but specify wtmp* instead of simply wtmp. I've never seen UNIX allow two files in the same directory to have the same name.
Darrell
- Tags:
- unprintable chars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2002 11:16 PM
06-01-2002 11:16 PM
Re: /var/adm has two wtmp files
directory. This will replace non-printable characters with the "?" character.
Also, just execute an "ls -i" without any arguments. This will show you the inodes for ALL files in /var/adm, and then you can use:
find . -inum
-tjh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2002 08:13 AM
06-03-2002 08:13 AM
Re: /var/adm has two wtmp files
ls -q showed the file listed as /var/adm/wtmp\010. Deleted the file with the command rm -i /var/adm/wtmp* and responded with "y" at the prompt to delete the file "wtm".